        body {
            margin: 0;
            padding: 0;
            overflow-x: hidden;
            overflow-y: auto;
        }
        #container { 
            display: flex;
            height: 100vh;
            width: 100vw;
            box-sizing: border-box;
            overflow: hidden;
        }
        #viewer { 
            flex: 1; 
            min-height: 400px;
            min-width: 400px;
            position: relative;
            overflow: hidden;
        }
        #viewer-inner {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
        }
        #controls { 
            width: 200px; 
            padding: 10px;
            transform-origin: top right;
        }
        #editor-panel {
            position: fixed;
            width: 300px;
            padding: 10px;
            display: none;
            background: white;
            border: 1px solid #ccc;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            z-index: 9999;
            top: 100px;
            left: 100px;
            resize: both;
            overflow: auto;
            min-width: 200px;
            min-height: 200px;
            max-width: 90vw;
            max-height: 90vh;
        }
        #editor-header {
            cursor: move;
            padding: 10px;
            background: #f0f0f0;
            margin: -10px -10px 10px -10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #ccc;
            -webkit-user-select: none;
            user-select: none;
        }
        .xyz-row {
            display: flex;
            margin: 2px 0;
        }
        .xyz-row:hover {
            background-color: #f0f0f0;
            cursor: pointer;
        }
        .xyz-row.selected {
            background-color: #e0e0ff;
        }
        .selection-count {
            font-size: 12px;
            color: #4040a0;
            margin-left: 6px;
            align-self: center;
        }
        .selection-hint {
            font-size: 11px;
            color: #888;
            margin: 4px 0;
        }
        .xyz-cell {
            padding: 2px 5px;
        }
        .atom-symbol { width: 40px; }
        .coordinate { width: 80px; }
        #xyz-editor {
            width: 100%;
            height: 400px;
            font-family: monospace;
            white-space: pre;
            resize: vertical;
        }
        #status { color: red; margin: 10px; }
        #orbitalControls {
            position: fixed;
            width: 300px;
            padding: 10px;
            display: none;
            background: white;
            border: 1px solid #ccc;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            z-index: 9999;
            top: 100px;
            left: 400px;
            resize: both;
            overflow: auto;
            min-width: 200px;
            min-height: 200px;
        }
        #orbital-header {
            cursor: move;
            padding: 10px;
            background: #f0f0f0;
            margin: -10px -10px 10px -10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #ccc;
        }
        #orbital-header h3 {
            margin: 0;
        }
        .orbital-nav {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin: 10px 0;
        }
        #orbitalList {
            max-height: 200px;
            overflow-y: auto;
            border: 1px solid #ddd;
            margin: 10px 0;
        }
        #orbitalList div {
            padding: 5px;
            cursor: pointer;
        }
        #orbitalList div:hover {
            background-color: #f0f0f0;
        }
        #orbitalList div.selected {
            background-color: #e0e0e0;
        }
        .homo-lumo-controls {
            display: flex;
            gap: 5px;
            margin: 10px 0;
        }
        .xyz-content-edit {
            display: none;
        }
        textarea.xyz-editor {
            width: 100%;
            min-height: 200px;
            font-family: monospace;
            margin: 10px 0;
        }
        .mode-buttons {
            margin: 10px 0;
        }
        .action-buttons {
            margin-top: 10px;
        }
        
        /* Add zoom container styles */
        body {
            transform-origin: center top;
            transition: transform 0.1s ease;
        }
        h3 {
            margin: 16px 0 2px 0;  /* Increased top margin from 8px to 16px */
        }
        
        /* Database search styles */
        .database-section {
            margin: 10px 0;
        }
        .database-group {
            margin: 8px 0;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            background: #f9f9f9;
        }
        .database-group input {
            width: 100%;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 3px;
            font-size: 12px;
            box-sizing: border-box;
        }
        .database-group input:focus {
            outline: none;
            border-color: #4CAF50;
            box-shadow: 0 0 3px rgba(76, 175, 80, 0.3);
        }

        /* Combined search input container */
        .search-input-container {
            position: relative;
            display: flex;
            align-items: center;
        }
        
        .search-input-container input {
            flex: 1;
            padding: 8px 30px 8px 8px; /* Reduced right padding for smaller selector */
            border: 1px solid #ccc;
            border-radius: 3px;
            font-size: 12px;
            margin: 0;
        }
        
        .search-input-container input:focus {
            outline: none;
            border-color: #4CAF50;
            box-shadow: 0 0 3px rgba(76, 175, 80, 0.3);
        }
        
        .search-type-selector {
            position: absolute;
            right: 1px;
            top: 1px;
            bottom: 1px;
            width: 25px;
            background: linear-gradient(to bottom, #f8f8f8 0%, #e8e8e8 100%);
            border-left: 1px solid #ccc;
            border-radius: 0 2px 2px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 12px;
            color: #666;
            transition: background 0.2s ease;
        }
        
        .search-type-selector:hover {
            background: linear-gradient(to bottom, #f0f0f0 0%, #d8d8d8 100%);
        }
        
        .search-type-selector.active {
            background: linear-gradient(to bottom, #e0e0e0 0%, #d0d0d0 100%);
        }
        
        .dropdown-arrow {
            font-size: 12px;
        }
        
        .search-type-dropdown {
            position: absolute;
            top: 100%;
            right: 0;
            width: 160px;
            background: white;
            border: 1px solid #ccc;
            border-radius: 3px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            z-index: 10000;
            display: none;
            margin-top: 2px;
        }
        
        .search-type-option {
            padding: 8px 12px;
            cursor: pointer;
            border-bottom: 1px solid #eee;
            transition: background 0.15s ease;
        }
        
        .search-type-option:last-child {
            border-bottom: none;
        }
        
        .search-type-option:hover {
            background: #f5f5f5;
        }
        
        .search-type-option.selected {
            background: #e8f5e8;
            color: #2e7d32;
        }
        
        .option-label {
            font-weight: bold;
            display: block;
            font-size: 12px;
        }
        
        .option-description {
            font-size: 10px;
            color: #666;
            margin-top: 2px;
            display: block;
        }

        /* Database search help styles */
        .database-help {
            background: #f9f9f9;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 8px;
            margin: 8px 0;
            font-size: 11px;
            color: #666;
        }
        .database-help h4 {
            margin: 0 0 4px 0;
            font-size: 12px;
            color: #333;
        }
        .database-help ul {
            margin: 4px 0;
            padding-left: 16px;
        }
        .database-help li {
            margin: 2px 0;
        }
        .database-help code {
            background: #fff;
            padding: 1px 3px;
            border-radius: 2px;
            font-family: monospace;
        }

        #jsmeContainer { 
            flex: 1; 
            min-height: 400px;
            min-width: 400px;
            position: relative;  /* Change from absolute to relative */
            display: none;
            background: white;
        }
        .console-button {
            padding: 8px 16px;
            font-size: 16px;
        }
        
        .console-container {
            display: flex;
            justify-content: flex-start;
            padding-left: 40px;  /* Increased padding from 20px to 40px to move button right */
            width: 100%;
            margin-top: 16px;
            margin-bottom: 16px;  /* Add space below console button */
        }
        
        /* Make ElemCo button container match console container */
        .elemco-container {
            display: flex;
            justify-content: flex-start;
            padding-left: 40px;
            width: 100%;
        }

        .xtb-container {
            display: flex;
            justify-content: flex-start;
            padding-left: 40px;
            width: 100%;
            margin-top: 8px;
        }

        #xtbButton {
            min-width: 86px;
        }

        #elemcoButton {
            background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%);
            border: 1px solid #ccc;
            padding: 8px calc(16px + 20px);  /* Original padding + 2.5px on each side = 5px total increase */
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            box-shadow: 
                0 2px 4px rgba(0,0,0,0.1),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -1px 0 rgba(0,0,0,0.05);
            transition: all 0.2s ease;
            margin: 8px 0;  /* Consistent margins */
        }

        #elemcoButton img {
            height: 32px;  /* Adjust logo size to better fit the button */
        }

        /* Adjust container margins to match Console button placement */
        .console-container, .elemco-container {
            display: flex;
            justify-content: flex-start;
            padding-left: 40px;
            width: 100%;
            margin: 8px 0;  /* Equal margins for both containers */
        }

        #structureFile {
            margin-bottom: 8px;  /* Add space below the file input */
            display: block;  /* Ensure it's on its own line */
        }
        .sample-buttons {
            margin-top: 4px;  /* Add space above the sample buttons */
        }
        #xtbPanel {
            display: none;
            position: fixed;
            top: 80px;
            left: 50%;
            margin-left: -300px;
            background: rgba(255, 255, 255, 0.98);
            border-radius: 12px;
            padding: 24px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            z-index: 10001;
            width: 600px;
            max-width: 90vw;
            max-height: 85vh;
            overflow-y: auto;
        }

        #xtb-header {
            cursor: move;
            margin: -24px -24px 16px -24px;
            padding: 12px 24px;
            border-bottom: 2px solid #3498db;
            -webkit-user-select: none;
            user-select: none;
        }

        #xtb-header h3 {
            margin: 0;
            color: #2c3e50;
            border-bottom: none;
            padding-bottom: 0;
            pointer-events: none;
        }

        #xtbPanel h3 {
            margin-top: 0;
            color: #2c3e50;
            border-bottom: 2px solid #3498db;
            padding-bottom: 10px;
        }

        #xtb-output {
            width: 100%;
            min-height: 200px;
            font-family: 'Courier New', monospace;
            font-size: 13px;
            box-sizing: border-box;
            resize: vertical;
            background: #1e1e1e;
            color: #d4d4d4;
        }

        #elemcoPanel {
            position: fixed;
            width: 350px; /* Reduced from 400px */
            padding: 10px;
            display: none;
            background: white;
            border: 1px solid #ccc;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            z-index: 9999;
            top: 120px;
            left: 120px;
            resize: both;
            overflow-x: hidden;
            overflow-y: auto;
            min-width: 250px; /* Reduced from 300px */
            min-height: 300px; /* Reduced from 400px */
            max-height: 90vh;
        }
        #elemcoPanel * {
            box-sizing: border-box;
        }
        #elemco-header {
            cursor: move;
            padding: 10px;
            background: #f0f0f0;
            margin: -10px -10px 10px -10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #ccc;
            -webkit-user-select: none;
            user-select: none;
        }
        #elemco-header img {
            height: 24px;
            margin-right: 10px;
        }
        .elemco-input-group {
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .elemco-input-group.vertical {
            flex-direction: column;
            align-items: stretch;
            gap: 4px;
        }
        .elemco-input-group.vertical > * {
            width: 100%;
        }
        .elemco-input-group.vertical label {
            min-width: unset;
            margin-bottom: 8px;
            font-weight: bold;
        }
        .elemco-input-group.vertical textarea {
            height: 150px;
            min-height: 120px;
            resize: vertical;
            padding: 8px;
            font-family: monospace;
            border: 1px solid #ccc;
            border-radius: 4px;
            margin: 0;
        }
        .elemco-input-group.vertical .preview-note {
            margin-top: 8px;
            color: #666;
            font-size: 0.9em;
            padding: 4px;
            background-color: #f8f8f8;
            border-radius: 4px;
        }
        .elemco-input-group input,
        .elemco-input-group select,
        .elemco-input-group textarea {
            width: 100%;
            padding: 5px;
            margin-bottom: 5px;
        }
        .elemco-input-group textarea {
            height: 120px; /* Reduced from 150px */
            font-family: monospace;
        }
        #elemcoButton {
            background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%);
            border: 1px solid #ccc;
            padding: 16px;  /* Increased padding */
            margin: 20px 40px;  /* Increased margins */
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            width: calc(100% - 80px);  /* Account for margins */
            border-radius: 12px;  /* More rounded corners */
            box-shadow: 
                0 2px 4px rgba(0,0,0,0.1),  /* Subtle drop shadow */
                inset 0 1px 0 rgba(255,255,255,0.9),  /* Top inner highlight */
                inset 0 -1px 0 rgba(0,0,0,0.05);  /* Bottom inner shadow */
            transition: all 0.2s ease;  /* Smooth transitions */
        }
        #elemcoButton:hover {
            background: linear-gradient(to bottom, #f8f8f8 0%, #f0f0f0 100%);
            transform: translateY(-1px);
            box-shadow: 
                0 4px 8px rgba(0,0,0,0.15),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -1px 0 rgba(0,0,0,0.05);
        }
        #elemcoButton:active {
            transform: translateY(1px);
            box-shadow: 
                0 1px 2px rgba(0,0,0,0.1),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -1px 0 rgba(0,0,0,0.05);
        }
        #elemcoButton img {
            height: 48px;  /* Made logo even bigger */
        }
        .preview-note {
            font-size: 0.8em;
            color: #666;
            margin-top: 4px;
        }

        button {
            background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%);
            border: 1px solid #ccc;
            padding: 6px 12px;  /* Reduced padding */
            border-radius: 6px;  /* Slightly reduced border radius */
            cursor: pointer;
            box-shadow: 
                0 2px 4px rgba(0,0,0,0.1),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -1px 0 rgba(0,0,0,0.05);
            transition: all 0.2s ease;
            font-size: 13px;  /* Slightly smaller font */
            color: #333;
            min-width: 70px;  /* Reduced minimum width */
            margin: 0;
        }

        button:hover {
            background: linear-gradient(to bottom, #f8f8f8 0%, #f0f0f0 100%);
            transform: translateY(-1px);
            box-shadow: 
                0 4px 8px rgba(0,0,0,0.15),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -1px 0 rgba(0,0,0,0.05);
        }

        button:active {
            transform: translateY(1px);
            box-shadow: 
                0 1px 2px rgba(0,0,0,0.1),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -1px 0 rgba(0,0,0,0.05);
        }

        /* Special styling for the ElemCo button since it's larger */
        #elemcoButton {
            padding: 12px;  /* Slightly reduced padding */
            margin: 16px 40px;  /* Slightly reduced margin */
            width: calc(100% - 80px);
            border-radius: 10px;  /* Slightly reduced border radius */
        }

        #elemcoButton img {
            height: 40px;  /* Slightly reduced logo size */
        }

        /* Toggle button active state */
        .toggle-button.active {
            background: linear-gradient(to bottom, #e0e0ff 0%, #d5d5ff 100%);
            box-shadow: 
                inset 0 1px 3px rgba(0,0,0,0.1),
                inset 0 1px 0 rgba(255,255,255,0.9);
        }

        /* Consistent styling for console button */
        .console-button {
            font-size: 14px;  /* Slightly reduced font size */
            padding: 7px 14px;  /* Slightly reduced padding */
        }

        /* Action buttons in panels */
        .action-buttons {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        /* Control line buttons */
        .control-line {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 4px 0;
        }

        /* Sample buttons container */
        .sample-buttons {
            display: flex;
            gap: 8px;
            margin-top: 4px;
        }

        /* Mode buttons */
        .mode-buttons {
            margin: 10px 0;
        }

        /* HOMO-LUMO controls */
        .homo-lumo-controls {
            display: flex;
            gap: 8px;
            margin: 10px 0;
        }

        /* Panel close buttons */
        #editor-header button,
        #orbital-header button,
        #elemco-header button {
            min-width: unset;
            padding: 4px 10px;  /* Reduced padding */
            font-size: 12px;  /* Smaller font */
        }

        /* Zoom control buttons - make them more compact */
        .control-line button[onclick*="adjustZoom"] {
            min-width: 40px;  /* Reduced from default 70px */
            padding: 6px 8px;  /* Reduced horizontal padding */
        }

        /* Keep the Reset button at normal width */
        .control-line button[onclick*="resetZoom"] {
            min-width: 70px;
        }

        /* Edit buttons - make them more compact */
        .control-line button[onclick*="showXYZEditor"],
        #dragMinButton,
        #toggle2D3DButton {
            min-width: 50px;  /* Reduced from default 70px */
            padding: 6px 8px;  /* Consistent with other compact buttons */
        }

        /* Console and ElemCo containers */
        .console-container, .elemco-container {
            margin: 8px 0;
            padding-left: 40px;
        }

        /* Common button styles */
        .console-button, #elemcoButton {
            display: inline-flex;
            align-items: center;
            padding: 8px 16px;
            font-size: 14px;
            background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%);
            border: 1px solid #ccc;
            border-radius: 8px;
            box-shadow: 
                0 2px 4px rgba(0,0,0,0.1),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -1px 0 rgba(0,0,0,0.05);
            transition: all 0.2s ease;
        }

        /* ElemCo button image */
        #elemcoButton img {
            height: 32px;
        }

        /* Remove all previous button container styles */
        .console-container, .elemco-container {
            padding-left: 40px;
            margin: 8px 0;
            width: auto;  /* Remove fixed width */
        }

        /* Button styles */
        .console-button, #elemcoButton {
            display: inline-flex;
            align-items: center;
            padding: 8px 16px;
            font-size: 14px;
            background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%);
            border: 1px solid #ccc;
            border-radius: 8px;
            box-shadow: 
                0 2px 4px rgba(0,0,0,0.1),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -1px 0 rgba(0,0,0,0.05);
            transition: all 0.2s ease;
            margin: 0;  /* Remove any margin from buttons */
        }

        /* Remove any width constraints on buttons */
        #elemcoButton {
            width: auto;
        }

        #elemcoButton img {
            height: 32px;
        }

        /* Container styles */
        .console-container, .elemco-container {
            padding-left: 40px;
            margin: 8px 0;
            width: auto;
            display: block;
        }

        /* Button base styles */
        .console-button, #elemcoButton {
            display: inline-flex;
            align-items: center;
            padding: 8px 16px;
            font-size: 14px;
            background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%);
            border: 1px solid #ccc;
            border-radius: 8px;
            box-shadow: 
                0 2px 4px rgba(0,0,0,0.1),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -1px 0 rgba(0,0,0,0.05);
            transition: all 0.2s ease;
            margin: 0;
        }

        /* ElemCo button image */
        #elemcoButton img {
            height: 32px;
        }

        #elemcoButton {
            display: inline-flex;
            align-items: center;
            padding: 8px calc(16px + 13px);  /* Original padding + 2.5px on each side = 5px total increase */
            font-size: 14px;
            background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%);
            border: 1px solid #ccc;
            border-radius: 8px;
            box-shadow: 
                0 2px 4px rgba(0,0,0,0.1),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -1px 0 rgba(0,0,0,0.05);
            transition: all 0.2s ease;
        }

        #elemcoButton img {
            height: 32px;
        }

        .method-df-line {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
        }
        
        .method-df-line select {
            flex: 1;
        }
        
        .df-toggle-label {
            display: flex;
            align-items: center;
            gap: 4px;
            margin: 0;
            min-width: unset !important;
            white-space: nowrap;
        }
        
        .df-toggle-label input[type="checkbox"] {
            width: auto;
            margin: 0;
        }
        
        /* ...existing styles... */
        .elemco-input-group.vertical {
            flex-direction: column;
            align-items: stretch;
            gap: 4px;
        }
        
        .elemco-input-group.vertical label {
            min-width: unset;
            margin-bottom: 4px;
        }

        .elemco-input-group.vertical textarea {
            height: 150px;
            min-height: 120px;
            resize: vertical;
            margin: 0;
        }

        .elemco-input-group.vertical a {
            display: inline-block;
            margin-bottom: 8px;
        }

        #elemco-input {
            font-family: monospace;
            width: 100%;
            height: 150px;
            min-height: 120px;
            resize: vertical;
            margin: 0;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
            overflow-x: hidden;
            word-wrap: break-word;
            white-space: pre-wrap;
        }

        .preview-note {
            font-size: 0.8em;
            color: #666;
            margin-top: 4px;
        }

        .elemco-input-group.vertical .doc-link-container {
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid #eee;
        }

        .elemco-input-group.vertical .doc-link-container a {
            color: #0066cc;
            text-decoration: none;
        }

        .elemco-input-group.vertical .doc-link-container a:hover {
            text-decoration: underline;
        }

        .elemco-input-group.vertical label {
            min-width: unset;
            margin-bottom: 8px;
            font-weight: bold;
        }

        .elemco-input-group.vertical textarea {
            height: 150px;
            min-height: 120px;
            resize: vertical;
            padding: 8px;
            font-family: monospace;
            border: 1px solid #ccc;
            border-radius: 4px;
            margin: 0;
        }

        .elemco-input-group.vertical .preview-note {
            margin-top: 8px;
            color: #666;
            font-size: 0.9em;
            padding: 4px;
            background-color: #f8f8f8;
            border-radius: 4px;
        }

        .elemco-input-group input[type="number"] {
            width: 45px;  /* Make number inputs exactly 3 characters wide */
            padding: 4px;
            text-align: center;
            appearance: textfield;  /* Standard property */
            -moz-appearance: textfield;  /* Firefox-specific */
        }
        
        /* Remove spinner arrows in Chrome/Safari/Edge */
        .elemco-input-group input[type="number"]::-webkit-outer-spin-button,
        .elemco-input-group input[type="number"]::-webkit-inner-spin-button {
            -webkit-appearance: none;
            appearance: none;
            margin: 0;
        }

        .charge-multiplicity-group {
            display: flex;
            justify-content: flex-start;
            gap: 24px;  /* Increased gap between charge and multiplicity */
            margin: 12px 0;
        }

        .charge-multiplicity-item {
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;  /* Prevent label wrapping */
        }

        .molden-export-group {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 12px 0;
        }

        .molden-toggle-label {
            display: flex;
            align-items: center;
            gap: 4px;
            margin: 0;
            min-width: unset !important;
            white-space: nowrap;
        }

        .molden-toggle-label input[type="checkbox"] {
            width: auto;
            margin: 0;
        }

        .molden-export-group input[type="text"] {
            flex: 1;
            padding: 4px 8px;
            border: 1px solid #ccc;
            border-radius: 4px;
            max-width: 200px;
        }

        #version-display {
            font-size: 12px;
            color: #666;
            margin-bottom: 16px;
            padding: 4px 8px;
            background: #f5f5f5;
            border-radius: 4px;
            cursor: pointer;
        }

        /* Julia output section styles */
        #julia-output-section {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid #ddd;
        }

        #julia-output {
            background: #f8f8f8;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-family: 'Courier New', monospace;
            font-size: 12px;
            line-height: 1.4;
            padding: 8px;
            resize: vertical;
            min-height: 150px;
            max-height: 400px;
            width: 100%;
            box-sizing: border-box;
            overflow-x: hidden;
            word-wrap: break-word;
            white-space: pre-wrap;
        }

        #julia-output:focus {
            outline: none;
            border-color: #4CAF50;
            box-shadow: 0 0 3px rgba(76, 175, 80, 0.3);
        }

        #preferencesPanel {
            position: fixed;
            width: 450px;
            padding: 0;
            display: none;
            background: white;
            border: 1px solid #ccc;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            z-index: 9999;
            top: 140px;
            left: 140px;
            resize: both;
            overflow: auto;
            min-width: 400px;
            min-height: 400px;
            border-radius: 8px;
        }

        #preferences-header {
            cursor: move;
            padding: 12px 15px;
            background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
            margin: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #ccc;
            -webkit-user-select: none;
            user-select: none;
            border-radius: 8px 8px 0 0;
        }

        .preferences-tabs {
            display: flex;
            background: #f0f0f0;
            border-bottom: 1px solid #ccc;
            margin: 0;
            padding: 0;
        }

        .preferences-tab {
            flex: 1;
            padding: 12px 8px;
            text-align: center;
            background: #f0f0f0;
            border: none;
            border-right: 1px solid #ccc;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            color: #666;
            transition: all 0.2s ease;
        }

        .preferences-tab:last-child {
            border-right: none;
        }

        .preferences-tab:hover {
            background: #e8e8e8;
            color: #333;
        }

        .preferences-tab.active {
            background: white;
            color: #333;
            border-bottom: 2px solid #4CAF50;
            font-weight: 600;
        }

        .preferences-content {
            padding: 15px;
            min-height: 300px;
        }

        .preferences-tab-content {
            display: none;
        }

        .preferences-tab-content.active {
            display: block;
        }

        .preference-section {
            margin-bottom: 20px;
            padding: 12px;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            background: #fafafa;
        }

        .preference-section h4 {
            margin: 0 0 12px 0;
            color: #333;
            font-size: 14px;
            font-weight: 600;
            border-bottom: 1px solid #e0e0e0;
            padding-bottom: 6px;
        }

        .preference-item {
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .preference-label {
            min-width: 130px;
            font-size: 13px;
            color: #555;
            font-weight: 500;
        }

        .preference-select, .preference-input {
            flex: 1;
            padding: 6px 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 13px;
            background: white;
        }

        .preference-select:focus, .preference-input:focus {
            outline: none;
            border-color: #4CAF50;
            box-shadow: 0 0 3px rgba(76, 175, 80, 0.3);
        }

        .preference-input {
            min-width: 150px;
        }

        .preference-checkbox-label {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            cursor: pointer;
            font-weight: 500;
        }

        .preference-checkbox-label input[type="checkbox"] {
            width: 16px;
            height: 16px;
        }

        .preference-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 20px;
            padding: 15px;
            border-top: 1px solid #e0e0e0;
            background: #f8f8f8;
            border-radius: 0 0 8px 8px;
        }

        .preference-save-button, .preference-reset-button, .preference-close-button {
            padding: 8px 16px;
            border: 1px solid #ccc;
            border-radius: 4px;
            background: #f5f5f5;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .preference-save-button {
            background: #4CAF50;
            color: white;
            border-color: #45a049;
        }

        .preference-save-button:hover {
            background: #45a049;
            transform: translateY(-1px);
        }

        .preference-reset-button:hover, .preference-close-button:hover {
            background: #e0e0e0;
            transform: translateY(-1px);
        }

        .color-input-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .color-preview {
            width: 30px;
            height: 30px;
            border: 1px solid #ccc;
            border-radius: 4px;
            cursor: pointer;
        }

        .preference-description {
            font-size: 11px;
            color: #777;
            margin-top: 4px;
            font-style: italic;
        }
