		* {
			margin: 0;
			padding: 0;
			box-sizing: border-box;
		}

		body {
			font-family: Arial, sans-serif;
			background-color: #f5f5f5;
			height: 100vh;
			overflow: hidden;
		}

		.main-container {
			display: flex;
			height: 100vh;
		}

		.left-column {
			width: 50%;
			padding: 20px;
			overflow-y: auto;
			background-color: #f5f5f5;
			position: relative;
		}

		.right-column {
			width: 50%;
			background-color: #1e1e1e;
			display: flex;
			flex-direction: column;
			border-left: 2px solid #ddd;
		}

		.container {
			background: white;
			padding: 20px;
			border-radius: 8px;
			box-shadow: 0 2px 10px rgba(0,0,0,0.1);
		}

		/* Header Logo Styles */
		.header-logo-container {
			position: relative;
			width: 64px;
			height: 64px;
			flex-shrink: 0;
		}

		.header-logo-image, .header-loader-image, .header-singing-image {
			position: absolute;
			width: 100%;
			height: 100%;
			object-fit: contain;
			transition: opacity 0.3s ease-in-out;
		}

		.header-logo-image {
			opacity: 1;
		}

		.header-loader-image {
			opacity: 0;
		}

		.header-logo-container.loading .header-logo-image {
			opacity: 0;
		}

		.header-logo-container.loading .header-loader-image {
			opacity: 1;
		}

		.header-singing-image {
			opacity: 0;
		}

		.header-logo-container.singing .header-logo-image {
			opacity: 0;
		}

		.header-logo-container.singing .header-singing-image {
			opacity: 1;
		}

		/* Buffer Status Bar */
		.buffer-gauge-container {
			position: fixed;
			bottom: 0;
			left: calc(50% - 4px);
			width: 4px;
			height: 100vh;
			background-color: rgba(0, 0, 0, 0.2);
			z-index: 1000;
			overflow: hidden;
		}

		.buffer-gauge-fill {
			position: absolute;
			bottom: 0;
			left: 0;
			width: 100%;
			background: linear-gradient(to top, #4caf50, #8bc34a, #ffeb3b, #ff9800, #f44336);
			transition: height 0.15s ease-out;
		}

		.buffer-gauge-label {
			display: none;
		}

		.input-group {
			margin-bottom: 15px;
		}

		label {
			display: block;
			margin-bottom: 5px;
			font-weight: bold;
			color: #333;
		}

		input[type="text"], input[type="password"], textarea, select {
			width: 100%;
			padding: 10px;
			border: 1px solid #ddd;
			border-radius: 4px;
			font-size: 14px;
			box-sizing: border-box;
		}

		select {
			cursor: pointer;
			background-color: white;
		}

			select:disabled {
				background-color: #f5f5f5;
				cursor: not-allowed;
			}

		textarea {
			font-family: monospace;
			resize: vertical;
			min-height: 80px;
		}

		.input-with-button {
			display: flex;
			gap: 10px;
			align-items: stretch;
		}

			.input-with-button input {
				flex: 1;
			}

			.input-with-button button {
				padding: 10px 15px;
				background-color: #17a2b8;
				color: white;
				border: none;
				border-radius: 4px;
				cursor: pointer;
				font-size: 12px;
				white-space: nowrap;
			}

				.input-with-button button:hover {
					background-color: #138496;
				}

		.chat-controls {
			display: flex;
			gap: 10px;
			margin-bottom: 20px;
		}

		#messageInput {
			flex: 1;
		}

		#sendButton, #sendNonStreamingButton, #stopButton {
			padding: 10px 20px;
			color: white;
			border: none;
			border-radius: 4px;
			cursor: pointer;
			font-size: 14px;
		}

		#sendButton {
			background-color: #007bff;
		}

			#sendButton:hover {
				background-color: #0056b3;
			}

		#sendNonStreamingButton {
			background-color: #28a745;
		}

			#sendNonStreamingButton:hover {
				background-color: #218838;
			}

		#stopButton {
			background-color: #dc3545;
			display: none;
		}

			#stopButton:hover {
				background-color: #c82333;
			}

		.log-header {
			background-color: #2d2d2d;
			padding: 15px 20px;
			display: flex;
			justify-content: space-between;
			align-items: center;
			border-bottom: 1px solid #3d3d3d;
		}

		.log-title {
			color: #ffffff;
			font-weight: bold;
			font-size: 16px;
		}

		#clearLogButton {
			padding: 8px 16px;
			background-color: #ffc107;
			color: #212529;
			border: none;
			border-radius: 4px;
			cursor: pointer;
			font-size: 12px;
			font-weight: bold;
		}

			#clearLogButton:hover {
				background-color: #e0a800;
			}

	.log-controls {
		display: flex;
		align-items: center;
		gap: 15px;
	}

	.log-toggle {
		display: flex;
		align-items: center;
		gap: 8px;
		color: #d4d4d4;
		font-size: 12px;
	}

	.log-toggle input[type="checkbox"] {
		cursor: pointer;
		width: 18px;
		height: 18px;
	}

	#responseDiv.hide-think .message-think {
		display: none;
	}

	#responseDiv.hide-chain-of-thought .message-chain-of-thought {
		display: none;
	}

	/* Name Display Styles */
	.name-display {
		padding: 8px 20px;
		background-color: #2d2d2d;
		border-bottom: 1px solid #3d3d3d;
		font-size: 13px;
		font-family: 'Courier New', monospace;
	}

	.name-label {
		font-weight: bold;
		color: #4a9eff;
		margin-right: 8px;
	}

	.name-content {
		color: #d4d4d4;
	}

	/* UI Table Styles */
	.message-ui {
		background-color: #1a2a3a;
		color: #d4d4d4;
		padding: 15px 20px;
	}

	.ui-table-title {
		font-size: 16px;
		font-weight: bold;
		color: #4a9eff;
		margin-bottom: 5px;
	}

	.ui-table-subtitle {
		font-size: 13px;
		color: #888;
		margin-bottom: 12px;
	}

	.ui-table {
		width: 100%;
		border-collapse: collapse;
		font-size: 13px;
		margin-top: 10px;
	}

	.ui-table th {
		background-color: #2a3a4a;
		color: #4a9eff;
		padding: 10px 12px;
		text-align: left;
		border-bottom: 2px solid #3a4a5a;
		font-weight: 600;
	}

	.ui-table td {
		padding: 8px 12px;
		border-bottom: 1px solid #2a3a4a;
		color: #d4d4d4;
	}

	.ui-table tr:hover td {
		background-color: #2a3a4a;
	}

	.ui-table th[data-align="center"],
	.ui-table td[data-align="center"] {
		text-align: center;
	}

	.ui-table th[data-align="right"],
	.ui-table td[data-align="right"] {
		text-align: right;
	}

	/* UI Block with Schema Builder */
	.ui-block-wrapper {
		position: relative;
	}

	.ui-block-header {
		display: flex;
		justify-content: flex-end;
		padding-bottom: 8px;
	}

	.json-toggle-btn {
		background-color: #3a4a5a;
		color: #888;
		border: none;
		border-radius: 4px;
		padding: 4px 8px;
		font-family: monospace;
		font-size: 12px;
		cursor: pointer;
		transition: all 0.2s;
	}

	.json-toggle-btn:hover {
		background-color: #4a5a6a;
		color: #aaa;
	}

	.json-toggle-btn.active {
		background-color: #4a9eff;
		color: white;
	}

	.ui-json-view {
		background-color: #0d1a26;
		border: 1px solid #2a3a4a;
		border-radius: 4px;
		padding: 12px;
		margin-top: 10px;
		font-family: monospace;
		font-size: 11px;
		color: #98c379;
		overflow-x: auto;
		white-space: pre-wrap;
		word-wrap: break-word;
	}

	.ui-json-view.hidden {
		display: none;
	}

		#responseDiv {
			flex: 1;
			padding: 0;
			overflow-y: auto;
			background-color: #1e1e1e;
			color: #d4d4d4;
			font-family: 'Courier New', monospace;
			font-size: 13px;
			line-height: 1.5;
		}

		.message-block {
			padding: 15px 20px;
			margin: 0;
			border-bottom: 1px solid #2d2d2d;
			white-space: pre-wrap;
			word-wrap: break-word;
			position: relative;
		}

		.message-trace-id {
			position: absolute;
			top: 5px;
			right: 10px;
			font-size: 10px;
			font-family: monospace;
			color: rgba(255, 255, 255, 0.5);
			background-color: rgba(0, 0, 0, 0.3);
			padding: 2px 6px;
			border-radius: 3px;
			cursor: pointer;
			transition: all 0.2s;
		}

			.message-trace-id:hover {
				background-color: rgba(0, 0, 0, 0.5);
				color: rgba(255, 255, 255, 0.8);
			}

		.message-user {
			background-color: #1a3a52;
			color: #e0e0e0;
		}

		.message-assistant {
			background-color: #2d523a;
			color: #d4d4d4;
		}

		.message-think {
			background-color: #3a2d52;
			color: #d0c4e0;
		}

		.message-chain-of-thought {
			background-color: #52422d;
			color: #e8d4b8;
		}

		.message-system {
			background-color: #1e1e1e;
			color: #888888;
			font-style: italic;
		}

		.message-separator {
			background-color: #252525;
			padding: 2px 20px;
			text-align: center;
			color: #666;
			font-size: 11px;
		}

		.status {
			padding: 10px;
			margin: 10px 0;
			border-radius: 4px;
			font-weight: bold;
		}

			.status.info {
				background-color: #d1ecf1;
				color: #0c5460;
				border: 1px solid #bee5eb;
			}

			.status.error {
				background-color: #f8d7da;
				color: #721c24;
				border: 1px solid #f1b0b7;
			}

			.status.success {
				background-color: #d4edda;
				color: #155724;
				border: 1px solid #c3e6cb;
			}

			.status.warning {
				background-color: #fff3cd;
				color: #856404;
				border: 1px solid #ffeaa7;
			}

		.hint {
			font-size: 12px;
			color: #6c757d;
			margin-top: 5px;
		}

		#chainOfThoughtDiv {
			padding: 10px;
			margin: 10px 0;
			border-radius: 4px;
			background-color: #e7f3ff;
			border: 1px solid #b3d9ff;
			font-size: 13px;
			display: none;
		}

		.agent-select-wrapper {
			display: flex;
			gap: 10px;
			align-items: stretch;
		}

			.agent-select-wrapper select {
				flex: 1;
			}

			.agent-select-wrapper button {
				padding: 10px 15px;
				background-color: #28a745;
				color: white;
				border: none;
				border-radius: 4px;
				cursor: pointer;
				font-size: 12px;
				white-space: nowrap;
			}

				.agent-select-wrapper button:hover {
					background-color: #218838;
				}

				.agent-select-wrapper button:disabled {
					background-color: #6c757d;
					cursor: not-allowed;
				}

		/* First Message / Continue Conversation Groups */
		.conversation-start-group {
			border: 2px solid #007bff;
			border-radius: 8px;
			padding: 15px;
			margin-bottom: 15px;
			background-color: #f8f9ff;
		}

		.conversation-start-group.disabled {
			opacity: 0.5;
			border-color: #ccc;
			background-color: #f5f5f5;
		}

		.group-header {
			display: flex;
			align-items: center;
			gap: 10px;
			margin-bottom: 12px;
			padding-bottom: 8px;
			border-bottom: 1px solid #dee2e6;
		}

		.group-title {
			font-weight: bold;
			font-size: 14px;
			color: #007bff;
		}

		.group-badge {
			font-size: 11px;
			padding: 3px 8px;
			border-radius: 12px;
			font-weight: bold;
		}

		.group-badge.new {
			background-color: #007bff;
			color: white;
		}

		.group-badge.continue {
			background-color: #28a745;
			color: white;
		}

		.or-divider {
			display: flex;
			align-items: center;
			margin: 12px 0;
			color: #6c757d;
			font-size: 13px;
			font-weight: bold;
		}

		.or-divider::before,
		.or-divider::after {
			content: '';
			flex: 1;
			height: 1px;
			background-color: #dee2e6;
		}

		.or-divider::before {
			margin-right: 12px;
		}

		.or-divider::after {
			margin-left: 12px;
		}

		.continue-conversation-group {
			border: 2px solid #28a745;
			border-radius: 8px;
			padding: 15px;
			margin-bottom: 15px;
			background-color: #f8fff8;
		}

		.continue-conversation-group.disabled {
			opacity: 0.5;
			border-color: #ccc;
			background-color: #f5f5f5;
		}

		.continue-conversation-group .group-title {
			color: #28a745;
		}

		.selection-indicator {
			display: inline-block;
			width: 10px;
			height: 10px;
			border-radius: 50%;
			margin-right: 8px;
			background-color: #ccc;
		}

		.selection-indicator.active {
			background-color: #28a745;
		}

		/* Backend-selected indication (for development debugging) */
		.backend-selected {
			border-color: #17a2b8 !important;
			box-shadow: 0 0 5px rgba(23, 162, 184, 0.5);
		}

		.selection-indicator.backend-selected {
			background-color: #17a2b8;
			animation: pulse 1s ease-in-out 2;
		}

		@keyframes pulse {
			0%, 100% {
				transform: scale(1);
			}
			50% {
				transform: scale(1.3);
			}
		}

		.auto-selected-badge {
			display: inline-flex;
			align-items: center;
			background-color: #17a2b8;
			color: white;
			font-size: 11px;
			font-weight: bold;
			padding: 4px 10px;
			border-radius: 10px;
			margin-left: 8px;
			white-space: nowrap;
			animation: fadeInBadge 0.3s ease-in-out;
		}

		@keyframes fadeInBadge {
			from {
				opacity: 0;
				transform: translateX(-10px);
			}
			to {
				opacity: 1;
				transform: translateX(0);
			}
		}

		/* Prompt Template Styles */
		.prompt-template-container {
			margin-bottom: 10px;
		}

		.prompt-template-container label {
			display: block;
			margin-bottom: 5px;
			font-weight: bold;
			color: #333;
			font-size: 13px;
		}

		.prompt-template-wrapper {
			display: flex;
			gap: 10px;
			align-items: stretch;
		}

		.prompt-template-wrapper select {
			flex: 1;
			padding: 8px 10px;
			border: 1px solid #ddd;
			border-radius: 4px;
			font-size: 13px;
			background-color: white;
		}

		.prompt-template-wrapper select:disabled {
			background-color: #f5f5f5;
			cursor: not-allowed;
			color: #999;
		}

		.prompt-template-wrapper button {
			padding: 8px 15px;
			background-color: #6f42c1;
			color: white;
			border: none;
			border-radius: 4px;
			cursor: pointer;
			font-size: 12px;
			white-space: nowrap;
		}

		.prompt-template-wrapper button:hover {
			background-color: #5a32a3;
		}

		.prompt-template-wrapper button:disabled {
			background-color: #ccc;
			cursor: not-allowed;
		}

		/* Tool Approval Styles */
		#toolApprovalContainer {
			display: none;
			margin-bottom: 20px;
			padding: 20px;
			background-color: #fff3cd;
			border: 2px solid #ffc107;
			border-radius: 8px;
		}

		.tool-approval-header {
			font-size: 18px;
			font-weight: bold;
			color: #856404;
			margin-bottom: 15px;
		}

		.tool-request-item {
			background-color: white;
			border: 1px solid #ddd;
			border-radius: 6px;
			padding: 15px;
			margin-bottom: 15px;
		}

		.tool-name {
			font-size: 16px;
			font-weight: bold;
			color: #333;
			margin-bottom: 10px;
		}

		.tool-id {
			font-size: 11px;
			color: #6c757d;
			font-family: monospace;
			margin-bottom: 10px;
		}

		.tool-requires-approval {
			display: inline-block;
			padding: 4px 8px;
			border-radius: 4px;
			font-size: 11px;
			font-weight: bold;
			margin-bottom: 10px;
		}

			.tool-requires-approval.required {
				background-color: #f8d7da;
				color: #721c24;
			}

			.tool-requires-approval.not-required {
				background-color: #d4edda;
				color: #155724;
			}

		.tool-section-label {
			font-weight: bold;
			font-size: 13px;
			color: #555;
			margin-top: 10px;
			margin-bottom: 5px;
		}

		.tool-arguments-textarea {
			width: 100%;
			min-height: 80px;
			font-family: monospace;
			font-size: 12px;
			padding: 8px;
			border: 1px solid #ddd;
			border-radius: 4px;
			box-sizing: border-box;
		}

		.tool-schema-toggle {
			background-color: #17a2b8;
			color: white;
			border: none;
			padding: 6px 12px;
			border-radius: 4px;
			cursor: pointer;
			font-size: 12px;
			margin-top: 5px;
		}

			.tool-schema-toggle:hover {
				background-color: #138496;
			}

		.tool-schema-content {
			display: none;
			margin-top: 10px;
			padding: 10px;
			background-color: #f8f9fa;
			border: 1px solid #ddd;
			border-radius: 4px;
			font-family: monospace;
			font-size: 11px;
			white-space: pre-wrap;
			overflow-x: auto;
		}

		.tool-approval-actions {
			display: flex;
			gap: 10px;
			margin-top: 20px;
			justify-content: flex-end;
		}

			.tool-approval-actions button {
				padding: 12px 24px;
				font-size: 14px;
				font-weight: bold;
				border: none;
				border-radius: 4px;
				cursor: pointer;
			}

		.tool-approve-button {
			background-color: #28a745;
			color: white;
		}

			.tool-approve-button:hover {
				background-color: #218838;
			}

		.tool-deny-button {
			background-color: #dc3545;
			color: white;
		}

			.tool-deny-button:hover {
				background-color: #c82333;
			}

		/* History Popup Styles */
		#historyPopup {
			display: none;
			position: fixed;
			top: 5%;
			left: 50%;
			transform: translateX(-50%);
			width: 80%;
			max-width: 800px;
			height: 85%;
			background-color: white;
			border: 2px solid #007bff;
			border-radius: 8px;
			box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
			z-index: 10000;
			flex-direction: column;
		}

			#historyPopup.active {
				display: flex;
			}

		.history-header {
			padding: 15px 20px;
			background-color: #007bff;
			color: white;
			border-radius: 6px 6px 0 0;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}

		.history-title {
			font-size: 18px;
			font-weight: bold;
		}

		.history-clear-all {
			padding: 8px 16px;
			background-color: #dc3545;
			color: white;
			border: none;
			border-radius: 4px;
			cursor: pointer;
			font-size: 12px;
			font-weight: bold;
		}

			.history-clear-all:hover {
				background-color: #c82333;
			}

		.history-list {
			flex: 1;
			overflow-y: auto;
			padding: 10px;
		}

		.history-item {
			padding: 12px 15px;
			margin-bottom: 8px;
			background-color: #f8f9fa;
			border: 2px solid transparent;
			border-radius: 4px;
			cursor: pointer;
			transition: all 0.2s;
			display: flex;
			justify-content: space-between;
			align-items: center;
			gap: 10px;
		}

			.history-item:hover {
				background-color: #e9ecef;
				border-color: #dee2e6;
			}

			.history-item.selected {
				background-color: #007bff;
				color: white;
				border-color: #0056b3;
			}

		.history-message {
			flex: 1;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}

		.history-delete {
			padding: 4px 10px;
			background-color: #dc3545;
			color: white;
			border: none;
			border-radius: 3px;
			cursor: pointer;
			font-size: 11px;
			flex-shrink: 0;
		}

			.history-delete:hover {
				background-color: #c82333;
			}

		.history-item.selected .history-delete {
			background-color: #721c24;
		}

			.history-item.selected .history-delete:hover {
				background-color: #5a1519;
			}

		.history-footer {
			padding: 12px 20px;
			background-color: #f8f9fa;
			border-top: 1px solid #dee2e6;
			text-align: center;
			font-size: 12px;
			color: #6c757d;
			border-radius: 0 0 6px 6px;
		}

		.history-overlay {
			display: none;
			position: fixed;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			background-color: rgba(0, 0, 0, 0.5);
			z-index: 9999;
		}

			.history-overlay.active {
				display: block;
			}
	#micButton {
		padding: 10px 20px;
		color: white;
		border: none;
		border-radius: 4px;
		cursor: pointer;
		font-size: 14px;
		background-color: #6f42c1;
	}

		#micButton:hover {
			background-color: #5a32a3;
		}

		#micButton.active {
			background-color: #dc3545;
		}

			#micButton.active:hover {
				background-color: #c82333;
			}

	#transcriptionDisplay {
		margin-top: 15px;
		padding: 12px;
		background-color: #f0f8ff;
		border: 1px solid #b0d4ff;
		border-radius: 4px;
		min-height: 40px;
		color: #333;
		display: none;
	}

	#transcriptionDisplay.active {
		display: block;
	}

	.transcription-item.final {
		color: #0d47a1;
	}

	.transcription-item.partial {
		font-style: italic;
		color: #666;
	}

	/* Settings Bar Styles */
	.settings-bar {
		background-color: #2d2d2d;
		padding: 10px 15px;
		border-radius: 8px 8px 0 0;
		margin-bottom: 0;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 15px;
	}

	.settings-bar-left {
		display: flex;
		align-items: center;
		gap: 10px;
	}

	.settings-bar-title {
		color: #ffffff;
		font-weight: bold;
		font-size: 14px;
	}

	.settings-bar-options {
		display: flex;
		align-items: center;
		gap: 15px;
	}

	.settings-toggle {
		display: flex;
		align-items: center;
		gap: 6px;
		color: #d4d4d4;
		font-size: 12px;
		cursor: pointer;
	}

	.settings-toggle input[type="checkbox"] {
		cursor: pointer;
		width: 16px;
		height: 16px;
	}

	.icon-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
		width: 32px;
		height: 32px;
		min-width: 32px;
		border-radius: 6px;
		border: none;
		background-color: #444;
		color: #888;
		font-size: 16px;
		cursor: pointer;
		transition: all 0.2s ease;
		opacity: 0.6;
	}

	.icon-toggle:hover {
		background-color: #555;
		opacity: 0.8;
	}

	.icon-toggle.active {
		background-color: #4a9eff;
		color: #fff;
		opacity: 1;
	}

	.icon-toggle .badge-icon {
		position: absolute;
		top: -2px;
		right: -2px;
		font-size: 15px;
		line-height: 1;
		opacity: 0.5;
	}

	.settings-bar-select {
		background-color: #444;
		color: #d4d4d4;
		border: none;
		border-radius: 6px;
		padding: 6px 8px;
		font-size: 12px;
		cursor: pointer;
	}

	.settings-bar-select:hover {
		background-color: #555;
	}

	.container.with-settings-bar {
		border-radius: 0 0 8px 8px;
	}

	.advanced-settings {
		background-color: #2a2a2a;
		border: 1px solid #444;
		border-radius: 6px;
		margin-bottom: 15px;
	}

	.advanced-settings-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 10px 15px;
		cursor: pointer;
		user-select: none;
	}

	.advanced-settings-header:hover {
		background-color: #333;
		border-radius: 6px;
	}

	.advanced-settings-title {
		color: #d4d4d4;
		font-size: 13px;
		font-weight: 500;
	}

	.advanced-settings-toggle {
		color: #888;
		font-size: 12px;
		transition: transform 0.2s ease;
	}

	.advanced-settings.collapsed .advanced-settings-toggle {
		transform: rotate(-90deg);
	}

	.advanced-settings-content {
		padding: 0 15px 15px 15px;
	}

	.advanced-settings.collapsed .advanced-settings-content {
		display: none;
	}

	.advanced-settings .input-group {
		margin-bottom: 10px;
	}

	.advanced-settings .input-group:last-child {
		margin-bottom: 0;
	}

	.advanced-settings .input-group label {
		color: #e0e0e0;
	}

	.advanced-settings .input-group .hint {
		color: #999;
	}
