* {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        input,
        textarea {
            -webkit-user-select: text;
            -moz-user-select: text;
            -ms-user-select: text;
            user-select: text;
        }

        img,
        a,
        button,
        canvas {
            -webkit-user-drag: none;
            -khtml-user-drag: none;
            -moz-user-drag: none;
            -o-user-drag: none;
            -user-drag: none;
        }

        canvas {
            -webkit-tap-highlight-color: transparent;
        }


        :root {
            --panel-width-desktop: 400px;
            --panel-width-tablet: 250px;
            --panel-width-mobile: 85vw;
            --panel-padding: clamp(10px, 2vw, 25px);
            --base-unit: calc(100vw / 100);
            --panel-width: clamp(280px, 25vw, 400px);
            --panel-height: clamp(400px, 80vh, 800px);
            --button-size: clamp(30px, 3vw, 45px);
            --spacing: clamp(8px, 1vw, 16px);
        }

        /* Base styles for panels */
        .left-panel {
            width: 300px;
            /* Fixed smaller width */
            height: clamp(60vh, 90vh, 95vh);
            padding: var(--panel-padding);
        }

        .right-panel {
            width: calc(100% - 350px);
            /* 300px (left panel) + 50px (gap) = 350px */
            height: auto;
            max-height: clamp(150px, 30vh, 200px);
        }

        @media (min-width: 1600px) {
            .right-panel {
                width: 20% !important;
                /* Reduced width to move panel right */
                margin-left: 70px !important;
                /* Added margin to move panel right */



            }
        }

        /* Extra Large Screen Adjustments */
        @media (min-width: 1920px) {
            .right-panel {
                width: 50% !important;
                margin-left: 80px;
                max-width: 1800px !important;
                left: 15% !important;
            }
        }

        /* Super Wide Screen Adjustments */
        @media (min-width: 2560px) {
            .right-panel {
                width: 50%;
                margin-left: 120px;
                max-width: 2000px;
                left: 15% !important;
            }
        }

        /* Large Screen Adjustments */
        @media (min-width: 1200px) and (max-width: 1919px) {
            .left-panel {
                width: 280px !important;
            }

            .right-panel {
                width: calc(100% - 600px) !important;
                max-width: 1600px !important;
                margin-left: 10% !important;
            }
        }


        /* Medium Screens */
        @media (max-width: 1200px) {
            :root {
                --panel-width: clamp(250px, 30vw, 350px) !important;
            }

            .left-panel {
                width: var(--panel-width-tablet) !important;

            }

            .right-panel {
                width: 40% !important;
                margin-left: 20% !important;
                max-height: 20%;
            }
        }

        /* Smaller Screens */
        @media (max-width: 768px) {
            :root {
                --panel-width: clamp(220px, 85vw, 300px) !important;
            }

            .left-panel {
                width: var(--panel-width-mobile) !important;
                height: 80vh !important;
            }

            .right-panel {
                width: 90% !important;
            }

            .color-options {
                grid-template-columns: repeat(4, 1fr) !important;
            }

            .texture-options {
                grid-template-columns: repeat(2, 1fr) !important;
            }

            .tab {
                min-width: 100px !important;
                padding: 8px 15px !important;
            }
        }

        @media (max-width: 480px) {
            :root {
                --panel-width: 90vw !important;
                --button-size: clamp(25px, 8vw, 35px) !important;
            }

            .left-panel {
                width: 95vw !important;
                height: 60vh !important;
            }

            .right-panel {
                width: 95% !important;
            }

            button {
                width: clamp(35px, 8vw, 45px) !important;
                height: clamp(35px, 8vw, 45px) !important;
            }

            .color-options {
                grid-template-columns: repeat(3, 1fr) !important;
            }

            .texture-options {
                grid-template-columns: repeat(2, 1fr) !important;
            }
        }

        @media (max-height: 500px) and (orientation: landscape) {
            .left-panel {
                height: 90vh;
            }

            .right-panel {
                max-height: 120px;
            }
        }

        @media (hover: none) {

            .tab,
            .color-option,
            .texture-option {
                padding: clamp(12px, 3vw, 20px);
            }

            .close-panel {
                width: 40px;
                height: 40px;
            }
        }

        /* Touch device optimizations */
        @media (hover: none) and (pointer: coarse) {

            .tab,
            .color-option,
            .texture-option {
                padding: calc(var(--spacing) * 1.5);
            }

            .close-panel {
                width: 40px;
                height: 40px;
            }

            .color-option,
            .texture-option {
                min-height: 40px;
                /* Minimum touch target size */
            }
        }


        body {
            margin: 0;
            overflow: hidden;
            background-color: #f4f4f9;
            display: flex;
            flex-direction: column;
            align-items: center;
            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
            color: #333;
        }

        #model-canvas {
            display: block;
            /* Ensure the canvas takes up the full screen */
            width: 100vw;
            height: 100vh;
        }

        #sidebar {
            position: inherit;

            top: 0;
            height: 100%;
            background: #f8f9fa;
            box-shadow: -2px 0px 5px rgba(0, 0, 0, 0.2);
            transition: right 0.3s ease;
            z-index: 10;
            overflow-y: auto;
        }

        #sidebar .sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            background: #007bff;
            color: #fff;
        }

        /* Fullscreen container that adapts to viewport size */
        #model-container {
            width: 50%;
            height: 50vh;
            position: relative;
        }

        /* Responsive Controls Panel */
        #controls {
            position: fixed;
            top: 2vh;
            left: 2vw;
            background-color: #ffffff;
            padding: clamp(1rem, 2vw, 1.5rem);
            /* Scale padding with viewport size */
            border-radius: 12px;
            z-index: 1;
            width: clamp(50px, 30vw, 300px);
            /* Scales between 50px and 300px */
            max-height: calc(50vh - 4vh);
            /* Leaves space around the edges */
            box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.15);
            display: flex;
            flex-direction: column;
            gap: 1vh;
            overflow-y: auto;
        }

        #controls h3 {
            font-family: 'Poppins';
            font-size: clamp(1rem, 2vw, 1.25rem);
            /* Responsive font size */
            font-weight: 600;
            color: #444;
        }

        /* Responsive Button Styles */
        button {
            margin: 0.3vh;
            padding: clamp(0.5rem, 2vw, 1rem);
            font-family: 'Poppins';
            font-size: clamp(0.8rem, 2vw, 1rem);

            border-radius: 50%;
            background-color: #eceff1;
            border: none;
            cursor: pointer;
            transition: background-color 0.3s, box-shadow 0.2s;
        }

        button:hover {
            background-color: #4a90e2;
            box-shadow: 0px 4px 12px rgba(0, 72, 188, 0.2);
            color: #ffffff;
        }


        #error-message {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(255, 0, 0, 0.8);
            color: white;
            padding: 10px;
            border-radius: 5px;
            font-size: 14px;
            font-family: Arial, sans-serif;
            visibility: hidden;
            z-index: 9999;
        }

        /* Customization Panel */
        #customization-div {
            position: absolute;
            bottom: 5vh;
            left: 2vw;
            padding: clamp(1rem, 2vw, 1.5rem);
            display: flex;
            flex-direction: column;
            gap: 1vh;
            align-items: center;
            /* justify-content: center; */
            border-radius: 12px;
            /* background-color: rgba(255, 255, 255, 0.9); */
            /* box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.15); */
            max-width: clamp(50px, 40vw, 300px);
            overflow-y: auto;
        }

        /* Color Buttons */
        .color-button {
            width: clamp(30px, 8vw, 40px);
            height: clamp(30px, 8vw, 40px);
            border-radius: 50%;
            margin: 0.5vh;
            border: none;
            cursor: pointer;
            transition: box-shadow 0.2s;
        }

        .color-button:hover {
            box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.2);
        }

        /* Texture and Visibility Buttons */
        .texture-button,
        .visibility-button {
            padding: clamp(0.5rem, 1vw, 1rem);
            font-family: 'Poppins';
            font-size: clamp(0.8rem, 2vw, 1rem);
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: box-shadow 0.2s, background-color 0.3s;
            color: #ffffff;
            box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.15);
            width: clamp(50px, 30vw, 140px);
            /* Scales width with viewport */
            margin: 0.5vh;
        }

        .texture-button {
            background-color: #5cb85c;
        }

        .texture-button:hover {
            background-color: #4a944a;
        }

        .visibility-button {
            background-color: #ff6f61;
        }

        .visibility-button:hover {
            background-color: #e65a4d;
        }


        /* Sidebar Styling */
        .sidebar {
            position: fixed;
            top: 0;
            right: -300px;
            width: 300px;
            height: 100%;
            background: linear-gradient(to bottom, #ffffff, #f4f4f9);
            box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
            z-index: 10;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            transition: right 0.4s ease;
        }

        .sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: #007bff;
            color: #fff;
            text-align: center;
            border-bottom: 2px solid #0056b3;
        }

        .close-button {
            background: none;
            border: none;
            color: #fff;
            font-size: 20px;
            cursor: pointer;
            transition: color 0.3s;
        }

        .close-button:hover {
            color: #ff5555;
            /* Red color when hovered */
        }

        .tabs {
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 5px;
            max-height: 70%;
            overflow-y: auto;
        }

        .tabs button {
            padding: 12px 20px;
            background: #f9f9f9;
            border: none;
            text-align: left;
            cursor: pointer;
            font-size: 14px;
            color: #444;
            transition: all 0.3s ease;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            white-space: normal;
            /* Allow text to wrap */
            word-wrap: break-word;
            /* Break long words to fit inside the button */
            overflow: hidden;
            text-overflow: ellipsis;
            height: auto;
            /* Let the height grow based on content */
            width: 100%;
            /* Make button full width */
        }

        .tabs button:hover {
            background: #e6e6e6;
            color: #007bff;
        }

        .tabs button.active {
            background: #007bff;
            color: white;
        }

        .customization-panel {
            padding: 15px;
            flex: 1;
            overflow-y: auto;
        }

        /* Color and Texture Previews */
        /* .color-options, .texture-options {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            margin-top: 15px;
        } */

        .color-swatch {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 3px solid #ccc;
            transition: transform 0.2s, border-color 0.3s;
            cursor: pointer;
        }

        .color-swatch.active,
        .color-swatch:hover {
            border-color: #007bff;
            transform: scale(1.1);
        }

        .texture-preview img {
            width: 60px;
            height: 60px;
            border-radius: 8px;
            transition: transform 0.3s, box-shadow 0.3s;
            cursor: pointer;
        }

        .texture-preview.active img {
            border: 3px solid #007bff;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .texture-preview img:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }



        /* Arrow Buttons with Glassmorphism */
        .arrow-button {
            position: fixed;
            width: 50px;
            height: 150px;
            background: rgba(51, 51, 51, 0.4);
            border-radius: 10px;
            cursor: pointer;
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
            z-index: 1000;
        }

        /* Left arrow button (now positioned on right side) */
        .left-arrow-button {
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 30px;
            height: 150px;
        }

        /* Right arrow button (now positioned at bottom) */
        .right-arrow-button {
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 150px;
            height: 30px;
        }

        .arrow {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 0;
            height: 0;
            border-style: solid;
        }

        /* Modified arrows for new positions */
        .left-arrow {
            border-width: 10px 15px 10px 0;
            /* Adjust border widths for a right-pointing triangle. */
            border-color: transparent #fff transparent transparent;
            /* Change the visible side to the right. */
        }

        .right-arrow {
            border-width: 0 10px 15px 10px;
            border-color: transparent transparent #fff transparent;
        }

        .arrow-button:hover {
            background: rgba(51, 51, 51, 0.6);
        }

        .arrow-button:active {
            background: rgba(51, 51, 51, 0.7);
        }

        /* Side Panels with Glassmorphism */
        .side-panel {
            position: fixed;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            color: #333;
            padding: 25px;
            overflow-x: hidden;
            box-shadow:
                0 8px 32px rgba(0, 0, 0, 0.15),
                inset 0 0 16px rgba(255, 255, 255, 0.1);
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 999;
            border: 1px solid rgba(255, 255, 255, 0.25);
            background-image: linear-gradient(125deg,
                    rgba(255, 255, 255, 0.3) 0%,
                    rgba(255, 255, 255, 0.3) 100%);
        }

        /* Left panel (right side) */
        .left-panel {
            width: var(--panel-width);
            height: var(--panel-height);
            max-height: 90vh;
            right: 0% !important;
            top: 50%;
            transform: translateX(100%) translateY(-50%) !important;
            display: flex;
            flex-direction: column;
            gap: 20px;
            overflow-x: hidden;
            border-radius: 25px;
            padding: calc(var(--spacing) * 2);
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            box-shadow:
                0 8px 32px rgba(0, 0, 0, 0.15),
                inset 0 0 16px rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.25);
            background-image: linear-gradient(125deg,
                    rgba(255, 255, 255, 0.3) 0%,
                    rgba(255, 255, 255, 0.2) 100%);
        }

        /* Right panel (bottom) */
        .right-panel {
            width: clamp(300px, 60vw, 800px);
            height: auto;
            max-height: clamp(150px, 30vh, 250px);
            bottom: 0;
            left: 0;
            transform: translateY(100%);
            margin: 0 10%;
            border-radius: 20px 20px 20px 20px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            box-shadow:
                0 8px 32px rgba(0, 0, 0, 0.15),
                inset 0 0 16px rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.25);
            background-image: linear-gradient(125deg,
                    rgba(255, 255, 255, 0.3) 0%,
                    rgba(255, 255, 255, 0.2) 100%);
        }

        .right-panel.panel-visible {
            position: fixed;
            /* Position relative to the viewport */
            bottom: 10px;
            /* Place it 10px from the bottom */
            right: 5vw;
            /* Position it slightly left from the right edge (5% of the viewport width) */
            transform: translate(0, 0) !important;
            /* Remove any vertical centering */
        }

        .left-panel.panel-visible {
            position: fixed;
            /* Fix the element relative to the viewport */
            right: 1% !important;
            top: 50%;
            /* Place the top of the element at 50% of the viewport height */
            transform: translate(0, -50%) !important;
            /* Shift it up by half its height for vertical centering */
        }


        .side-panel h3 {
            font-family: 'Poppins', sans-serif;
            font-size: 1.2rem;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid rgba(44, 62, 80, 0.1);
        }

        .right-panel.close-button {
            top: 15px !important;
            right: 5px !important;
        }

        .right-panel h3 {
            margin: 0;
            border-radius: 5px;
            padding: 15px 40px 15px 15px;
            /* Add right padding to prevent text overlap with close button */
            background: rgba(255, 255, 255, 0.1);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            flex-shrink: 0;
            position: relative;
            /* Ensure proper positioning context */
        }

        /* Tabs Styling */
        .tabs-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            padding: 10px;
            overflow-y: auto;
            /* Enable vertical scroll when needed */
            max-height: calc(100% - 60px);
            /* Account for panel header */
            margin-right: 6px;
            /* Space for scrollbar */
        }

        /* Modified tab styling for bottom panel */
        .right-panel .tabs-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            overflow-x: auto;
            padding-bottom: 10px;
        }

        .tab {
            padding: 8px 16px;
            background-color: #f0f0f0;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            height: 32px;
            /* Fixed height for consistent row height */
            white-space: nowrap;
            transition: background-color 0.2s;
            align-items: center !important;
        }

        /* Modified tab styling for bottom panel */
        .right-panel .tab {
            flex: 0 0 auto;
            margin-bottom: 0;
        }

        .right-panel .close-panel:hover {
            background: rgba(255, 255, 255, 0.4);
            transform: rotate(90deg);
        }

        .tab:hover {
            transform: translateY(-2px);
            background: rgba(255, 255, 255, 0.3);
        }

        @media (max-width: 768px) {
            .right-panel {
                width: 80%;
                margin: 0 10%;
            }

            .tab {
                min-width: 100px;
                padding: 10px 15px;
            }
        }

        @media (max-width: 480px) {
            .right-panel {
                width: 90%;
                margin: 0 5%;
            }

            .tab {
                min-width: 90px;
                padding: 8px 12px;
                font-size: 0.8rem;
            }
        }

        .tab.active {
            background: #007bff;
            color: white;
            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
        }

        .close-panel {
            position: absolute;
            top: 15px;
            right: 15px;
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: #2c3e50;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .close-panel:hover {
            background: rgba(255, 255, 255, 0.4);
            transform: rotate(90deg);
        }

        /* Modified close button for bottom panel */
        .right-panel .close-panel {
            position: absolute;
            top: 35px;
            /* Adjust from 15px to 10px for better vertical alignment */
            right: 30px;
            /* Adjust from 15px to 10px for better spacing from edge */
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: #2c3e50;
            width: 24px;
            /* Slightly smaller size to fit better in the bottom panel */
            height: 24px;
            /* Slightly smaller size to fit better in the bottom panel */
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            z-index: 1000;
            /* Ensure it stays on top of other elements */
        }

        .part-info {
            margin-top: 10px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 5px;
        }

        /* Scrollbar styling for panels */
        .side-panel::-webkit-scrollbar {
            width: 6px;
            /* height: 6px; */
        }

        .side-panel::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
        }

        .side-panel::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 3px;
        }

        /* Make bottom panel scrollable horizontally */
        .right-panel {
            overflow-x: auto;
            overflow-y: hidden;
        }


        /* Add these new styles for the color and texture options */
        .properties-container {

            height: auto;
            overflow-x: hidden;
            /* Prevent horizontal scroll */
            width: 100%;
        }

        .section-title {

            color: #333;
            margin: 15px 0 10px;
            padding-bottom: 5px;
            border-bottom: 2px solid rgba(0, 0, 0, 0.1);
            width: 100%;
        }

        .mesh-name {
            color: #2c3e50;
            min-height: 40px;
            justify-content: center;
            align-items: center;
            /* Add this line to center vertically */
            display: flex;
            /* Add this line to enable Flexbox */
            background: rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            text-align: center;
            font-weight: 500;
            width: 100%;
        }


        /* .color-options, .texture-options {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin: 10px 0;
        } */

        .color-option,
        .texture-option {
            padding: 15px;
            border-radius: 5px;
            cursor: pointer;
            text-align: center;
            background: rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }


        .color-option:hover,
        .texture-option:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .texture-options {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;

            max-height: 300px;
            overflow-y: auto;
            overflow-x: hidden;
            /* Prevent horizontal scroll */
            width: 100%;
        }


        .texture-option:hover {
            transform: scale(1.05);
        }

        .texture-preview {
            width: 100%;
            height: 80px;
            border-radius: 8px;
            background-size: cover;
            background-position: center;
            border: 2px solid rgba(255, 255, 255, 0.5);
        }

        .texture-name {
            font-size: 0.8em;
            color: #666;
            text-align: center;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .visibility-toggle {
            width: 99%;
            padding: 12px 20px;
            background-color: #f0f0f0;
            border: none;
            border-radius: 8px;
            /* Increased border radius for more curved edges */
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            font-weight: 500;
            color: #333;
            margin-top: auto;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .visibility-toggle:hover {
            background-color: #e0e0e0;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        }

        .visibility-toggle:active {
            transform: translateY(1px);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .color-options {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            /* Three equal columns */
            gap: 10px;
            padding: 10px;
            margin-bottom: 20px;
            width: 100%;
            overflow-x: hidden;
            /* Prevent horizontal scroll */
        }


        .color-option-container {
            display: flex;
            flex-direction: column;
            align-items: center;

            width: 80%;
        }

        .color-name {
            font-size: 0.75em;
            color: #333;
            text-align: center;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            padding: 0 2px;
        }

        .color-option:hover {
            transform: scale(1.1);
        }

        .color-option.active::after {
            /* content: '✓'; */
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        }

        .color-option {
            width: 30px;
            height: 30px;
            border-radius: 50%;

            cursor: pointer;
            border: 2px solid #fff;
        }

        .color-option:hover {
            border-color: #000;
        }

        .tab {
            flex: 0 0 auto;
            /* Don't allow tabs to grow/shrink */
            min-width: 120px;
            /* Minimum width for tabs */
            max-width: 200px;
            /* Maximum width for tabs */
            padding: 12px 20px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: 'Poppins', sans-serif;
            font-size: 0.9rem;
            color: #2c3e50;
            border: 1px solid rgba(255, 255, 255, 0.1);
            white-space: nowrap;
            /* Prevent text wrapping */
            overflow: hidden;
            /* Hide overflowing text */
            text-overflow: ellipsis;
            /* Show ellipsis for long text */
            margin-bottom: 5px;
            /* Space between rows */
        }

        .tabs-container::-webkit-scrollbar {
            width: 6px;
        }

        .tabs-container::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
        }

        .tabs-container::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 3px;
        }

        .tabs-container::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.4);
        }

        .tab.active {
            background: #007bff;
            color: white;
        }

        .panel-visible {
            transform: translateX(0) !important;
        }

        .side-panel::-webkit-scrollbar {
            width: 6px;
        }

        .side-panel::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
        }

        .side-panel::-webkit-scrollbar-thumb {
            background: rgba(44, 62, 80, 0.2);
            border-radius: 3px;
        }

        .side-panel::-webkit-scrollbar-thumb:hover {
            background: rgba(44, 62, 80, 0.3);
        }

        /* Scrollbar styling */
        .color-options::-webkit-scrollbar,
        .texture-options::-webkit-scrollbar {
            width: 6px;
        }

        .color-options::-webkit-scrollbar-track,
        .texture-options::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.1);
            border-radius: 3px;
        }

        .color-options::-webkit-scrollbar-thumb,
        .texture-options::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 3px;
        }

        .color-options::-webkit-scrollbar-thumb:hover,
        .texture-options::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.3);
        }

        #mesh-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 10px;
            max-height: calc(3 * (32px + 8px));
            /* Height of 3 rows (button height + gap) */
            overflow-y: auto;
            /* Enable vertical scrolling */
            scrollbar-width: thin;
            /* For Firefox */
            -ms-overflow-style: none;
            /* For Internet Explorer and Edge */
            scrollbar-color: rgba(155, 155, 155, 0.7) transparent;
        }

        /* Webkit scrollbar styles (Chrome, Safari, newer Edge) */
        #mesh-tabs::-webkit-scrollbar {
            width: 6px;
        }

        #mesh-tabs::-webkit-scrollbar-track {
            background: transparent;
        }

        #mesh-tabs::-webkit-scrollbar-thumb {
            background-color: rgba(155, 155, 155, 0.7);
            border-radius: 3px;
            border: transparent;
        }

        /* Add this to your existing  section */
        @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap');

        /* Simplified and optimized loading screen styles */
        .loading-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            z-index: 9999;
            transition: opacity 0.5s ease-out;
        }

        .loading-text {
            text-align: center;
            color: #fff;
            position: relative;
            padding: 20px;
        }

        .loading-text span {
            font-family: 'Poppins';
            font-size: 48px;
            display: inline-block;
            opacity: 0;
            transform: translateY(20px);
            margin: 0 4px;
            animation: fadeInUp 2s infinite;
        }

        /* Simplified animation */
        @keyframes fadeInUp {
            0% {
                opacity: 0;
                transform: translateY(20px);
            }

            20%,
            80% {
                opacity: 1;
                transform: translateY(0);
            }

            100% {
                opacity: 0;
                transform: translateY(-20px);
            }
        }

        /* Simplified delays for letters */
        .loading-text span:nth-child(2) {
            animation-delay: 0.1s;
        }

        .loading-text span:nth-child(3) {
            animation-delay: 0.2s;
        }

        .loading-text span:nth-child(4) {
            animation-delay: 0.3s;
        }

        .loading-text span:nth-child(5) {
            animation-delay: 0.4s;
        }

        .loading-text span:nth-child(6) {
            animation-delay: 0.5s;
        }

        .loading-text span:nth-child(7) {
            animation-delay: 0.6s;
        }

        /* Simple progress bar */
        .loading-bar {
            width: 200px;
            height: 3px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
            margin: 20px auto 0;
            position: relative;
            overflow: hidden;
        }

        .loading-bar::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 50%;
            background: #fff;
            animation: loading 1.5s infinite ease-in-out;
        }

        @keyframes loading {
            0% {
                transform: translateX(-200%);
            }

            100% {
                transform: translateX(200%);
            }
        }

        /* Simplified social links */
        .socials {
            position: fixed;
            bottom: 1%;
            right: 1% !important;
            display: flex;
            gap: 12px !important;
            z-index: 10000;
        }

        .social-link {
            color: #fff;
            opacity: 0.7;
            transition: opacity 0.3s;
        }

        .social-link:hover {
            opacity: 1;
        }

        /* Hide canvas initially */
        #model-canvas {
            opacity: 0;
            transition: opacity 0.5s ease-in;
        }

        /* Basic responsive adjustments */
        @media (max-width: 768px) {
            .loading-text span {
                font-size: 36px;
            }
        }

        @media (max-width: 480px) {
            .loading-text span {
                font-size: 24px;
            }
        }