:root {
  --bg-main: #ffffff;
  --bg-sidebar: #000000;
  --bg-user-message: #e3f2fd;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #e0e0e0;
  --nav-bg: #000000;
  --nav-text: #ffffff;
  --accent: #0696d7;
  --accent-hover: #0570a6;
  --green-accent: #2dcd7c;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  overflow: hidden;
}

/* ============================================
   TOP NAVIGATION BAR
   ============================================ */
.top-nav {
  height: 64px;
  background: var(--nav-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #1a1a1a;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.autodesk-logo {
  display: flex;
  align-items: center;
}

.autodesk-logo-img {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.nav-divider {
  color: #666;
  font-size: 18px;
}

.nav-title {
  color: var(--nav-text);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--nav-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-icon-btn svg {
  width: 20px;
  height: 20px;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-accent);
  color: white;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.nav-avatar:hover {
  transform: scale(1.05);
}

/* ============================================
   APP CONTAINER & SIDEBAR
   ============================================ */
.app-container {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}

/* Resize Handle for Sidebar */
.resize-handle-sidebar {
  width: 6px;
  min-height: 100%;
  background: #2a2a2a;
  cursor: col-resize;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
  transition: background 0.15s ease;
}

.resize-handle-sidebar:hover,
.resize-handle-sidebar.dragging {
  background: var(--accent);
}

/* Expand hit area for easier grabbing */
.resize-handle-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  right: -4px;
  bottom: 0;
  cursor: col-resize;
}

.sidebar {
  width: 280px;
  min-width: 60px;
  max-width: 500px;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar.resizing {
  transition: none;
  user-select: none;
}

.sidebar.collapsed {
  width: 60px;
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
  border-bottom: 1px solid #2a2a2a;
  height: 64px; /* Fixed height for consistency */
  box-sizing: border-box;
  white-space: nowrap;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s;
}

.sidebar-toggle-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-toggle-btn svg {
  width: 20px;
  height: 20px;
}

.sidebar-header h2 {
  margin: 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--nav-text);
  flex: 1;
  opacity: 1;
  transition: opacity 0.2s;
}

.sidebar.collapsed .sidebar-header h2 {
  opacity: 0;
  width: 0;
  margin: 0;
  pointer-events: none;
}

.new-conversation-btn {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: white;
  flex-shrink: 0;
}

/* When collapsed, stack buttons vertically */
.sidebar.collapsed .sidebar-header {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 8px;
  height: auto;
}

/* Conversations List */
.conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  opacity: 1;
  transition: opacity 0.2s;
}

.sidebar.collapsed .conversations-list {
  opacity: 0;
  pointer-events: none;
  padding: 0;
}

.conversations-loading {
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

.conversation-item {
  padding: 12px 16px;
  margin-bottom: 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: var(--nav-text);
}

.conversation-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.conversation-item.active {
  background: rgba(6, 150, 215, 0.2);
}

.conversation-title {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-rename-input {
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  width: 100%;
  padding: 2px 6px;
  margin: -2px 0 2px -6px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: rgba(6, 150, 215, 0.1);
  color: white;
  outline: none;
}

.conversation-rename-input:focus {
  box-shadow: 0 0 0 2px rgba(6, 150, 215, 0.3);
}

.conversation-meta {
  font-size: 12px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}

.conversation-time {
  font-size: 11px;
}

.conversation-messages {
  font-size: 11px;
}

.conversations-list::-webkit-scrollbar {
  width: 6px;
}

.conversations-list::-webkit-scrollbar-track {
  background: transparent;
}

.conversations-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.conversations-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Conversation Item Menu */
.conversation-item {
  position: relative;
}

.conversation-menu-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  color: #999;
}

.conversation-item:hover .conversation-menu-btn {
  opacity: 1;
}

.conversation-menu-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.conversation-menu-btn svg {
  width: 16px;
  height: 16px;
}

/* Conversation Dropdown Menu */
.conversation-dropdown {
  position: absolute;
  right: 8px;
  top: 100%;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  min-width: 140px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: none;
  overflow: hidden;
}

.conversation-dropdown.open {
  display: block;
}

.conversation-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.conversation-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.conversation-dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.conversation-dropdown-item.delete {
  color: #ef4444;
}

.conversation-dropdown-item.delete:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Confirm Dialog Overlay */
.confirm-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.confirm-dialog {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.15s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.confirm-dialog h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #1a1a1a;
}

.confirm-dialog p {
  margin: 0 0 24px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-dialog-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-dialog-btn.cancel {
  background: #f0f0f0;
  border: none;
  color: #333;
}

.confirm-dialog-btn.cancel:hover {
  background: #e0e0e0;
}

.confirm-dialog-btn.danger {
  background: #ef4444;
  border: none;
  color: white;
}

.confirm-dialog-btn.danger:hover {
  background: #dc2626;
}

.hamburger-btn {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger-btn svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  flex: 1;
  min-width: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-content.resizing {
  transition: none;
  user-select: none;
}

.main-content.chat-column {
  border-right: none;
}

/* Remove border when no previews visible */
.main-content.chat-column:last-child {
  border-right: none;
}

/* ============================================
   PREVIEW COLUMNS
   ============================================ */
.preview-column {
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-main);
  position: relative;
  flex-shrink: 0;
  transition: width 0.3s ease;
}

/* Show preview column when it has content */
.preview-column.has-content {
  display: flex;
}

/* Device size modes */
.preview-column.device-mobile {
  width: 375px;
}

.preview-column.device-tablet {
  width: 768px;
}

.preview-column.device-desktop {
  flex: 2;
  width: auto;
  min-width: 500px;
}

.preview-column.before-preview {
  border-right: 1px solid var(--border-color);
}

.preview-header {
  padding: 12px 16px;
  background: #f8f8f8;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Device toggle buttons */
.device-toggle-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.device-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

.device-toggle-btn.active {
  background: rgba(6, 150, 215, 0.1);
  color: var(--accent);
}

.copy-url-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.copy-url-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}

.copy-url-btn:active {
  transform: scale(0.95);
}

.copy-url-btn svg {
  display: block;
}

.pop-out-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.pop-out-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}

.pop-out-btn:active {
  transform: scale(0.95);
}

.pop-out-btn svg {
  display: block;
}

.preview-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.preview-iframe.loaded {
  opacity: 1;
}

/* Loading Spinner for iframes */
.iframe-loading-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.iframe-loading-spinner.hidden {
  opacity: 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spinRotate 1s linear infinite;
}

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

/* Page Header */
.page-header {
  padding: 24px 32px;
  border-bottom: 1px solid #f0f0f0;
  background: var(--bg-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.page-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-icon {
  width: 28px;
  height: 28px;
  stroke: var(--text-primary);
  color: var(--text-primary);
  stroke-width: 2;
}

.page-title h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================
   CHAT CONTAINER
   ============================================ */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  scroll-behavior: smooth;
}

/* ============================================
   MESSAGES
   ============================================ */
.message {
  margin-bottom: 24px;
  display: flex;
  animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.assistant {
  justify-content: flex-start;
}

.message.user {
  justify-content: flex-end;
}

.message-content {
  max-width: 75%;
  padding: 16px 20px;
  border-radius: 12px;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.message.assistant .message-content {
  background: transparent;
  text-align: left;
  padding-left: 0;
}

.message.user .message-content {
  background: var(--bg-user-message);
  border: 1px solid #b3d9f2;
  position: relative;
}

.message.user .message-content::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 16px;
  width: 0;
  height: 0;
  border-left: 8px solid var(--bg-user-message);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* Removed decorative "..." as it was distracting */

.message-content p {
  margin: 0 0 12px 0;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content ul,
.message-content ol {
  margin: 8px 0;
  padding-left: 24px;
}

.message-content li {
  margin: 4px 0;
}

.message-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 0.9em;
  color: #e01e5a;
}

.message-content pre {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 12px 0;
}

.message-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.message-content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  margin: 12px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.message-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
}

.message-content th,
.message-content td {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  text-align: left;
}

.message-content th {
  background: #f5f5f5;
  font-weight: 600;
}

.message-content a {
  color: var(--accent);
  text-decoration: none;
}

.message-content a:hover {
  text-decoration: underline;
}

.message-content strong {
  font-weight: 600;
}

.message-content em {
  font-style: italic;
}

.message-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 16px 0;
}

.separator {
  height: 1px;
  background: var(--border-color);
  margin: 16px 0;
}

/* ============================================
   COMPOSER (INPUT AREA)
   ============================================ */
.composer {
  padding: 0 32px 32px 32px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 150, 215, 0.1);
}

.ai-icon {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  flex-shrink: 0;
}

.input-wrapper textarea {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  padding: 4px 0;
  resize: none;
  font-family: inherit;
  line-height: 1.5;
  max-height: 200px;
  overflow-y: auto;
}

.input-wrapper textarea::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.send-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}

.send-btn svg {
  width: 20px;
  height: 20px;
}

.input-disclaimer {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.input-disclaimer a {
  color: var(--accent);
  text-decoration: none;
}

.input-disclaimer a:hover {
  text-decoration: underline;
}

/* ============================================
   QUICK PROMPTS
   ============================================ */
.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.quick-prompt-btn {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.quick-prompt-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(6, 150, 215, 0.05);
}

/* Hide quick prompts when not a new conversation */
.chat-container:not(.new-conversation) .quick-prompts {
  display: none;
}

/* ============================================
   NEW CONVERSATION STATE - Centered Input
   ============================================ */
.chat-container.new-conversation {
  justify-content: center;
}

.chat-container.new-conversation .chat-messages {
  display: none;
}

.chat-container.new-conversation .composer {
  padding: 32px;
}

/* ============================================
   INLINE WIDGETS (Buttons & Selectors)
   ============================================ */
.chat-widget {
  margin: 16px 0;
  max-width: 600px;
}

/* Buttons Widget */
.widget-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.widget-btn {
  background: white;
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.widget-btn:hover:not(.disabled) {
  background: var(--accent);
  color: white;
}

.widget-btn.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.widget-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Selector Widget */
.widget-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.widget-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.widget-option:hover {
  border-color: var(--accent);
  background: rgba(6, 150, 215, 0.05);
}

.widget-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.widget-option input:checked + span {
  color: var(--accent);
  font-weight: 500;
}

.widget-submit-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  align-self: flex-start;
}

.widget-submit-btn:hover:not(.disabled) {
  background: var(--accent-hover);
}

.widget-submit-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   STREAMING & TOOL ACTIVITY
   ============================================ */
.thinking-status {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  margin: 12px 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
  border-radius: 16px;
  font-size: 13px;
  color: #ffffff;
  border: 1px solid rgba(6, 150, 215, 0.2);
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(6, 150, 215, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: visible;
}

/* Autodesk 3D Loader - Grandiose Animation */
.adsk-loader {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  perspective: 800px;
  transform-style: preserve-3d;
}

/* Orbiting rings */
.adsk-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 2px solid transparent;
  transform-style: preserve-3d;
}

.adsk-orbit-1 {
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  border-top-color: #0696D7;
  border-right-color: rgba(6, 150, 215, 0.3);
  animation: adsk-orbit-spin-1 3s linear infinite;
  filter: drop-shadow(0 0 8px rgba(6, 150, 215, 0.6));
}

.adsk-orbit-2 {
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-bottom-color: #00bfa5;
  border-left-color: rgba(0, 191, 165, 0.3);
  animation: adsk-orbit-spin-2 2.5s linear infinite reverse;
  filter: drop-shadow(0 0 6px rgba(0, 191, 165, 0.5));
}

.adsk-orbit-3 {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-top-color: #ff6b35;
  border-left-color: rgba(255, 107, 53, 0.3);
  animation: adsk-orbit-spin-3 2s linear infinite;
  filter: drop-shadow(0 0 4px rgba(255, 107, 53, 0.4));
}

@keyframes adsk-orbit-spin-1 {
  0% { transform: rotateX(60deg) rotateZ(0deg); }
  100% { transform: rotateX(60deg) rotateZ(360deg); }
}

@keyframes adsk-orbit-spin-2 {
  0% { transform: rotateX(-30deg) rotateY(45deg) rotateZ(0deg); }
  100% { transform: rotateX(-30deg) rotateY(45deg) rotateZ(360deg); }
}

@keyframes adsk-orbit-spin-3 {
  0% { transform: rotateY(60deg) rotateZ(0deg); }
  100% { transform: rotateY(60deg) rotateZ(360deg); }
}

/* Central core with logo */
.adsk-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  transform-style: preserve-3d;
  animation: adsk-core-pulse 2s ease-in-out infinite;
}

.adsk-logo {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
  animation: adsk-logo-rotate 4s ease-in-out infinite;
}

.adsk-mark {
  fill: #ffffff;
}

@keyframes adsk-core-pulse {
  0%, 100% { 
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(6, 150, 215, 0.4));
  }
  50% { 
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(6, 150, 215, 0.8));
  }
}

@keyframes adsk-logo-rotate {
  0% { transform: perspective(400px) rotateY(0deg) rotateX(0deg); }
  25% { transform: perspective(400px) rotateY(180deg) rotateX(10deg); }
  50% { transform: perspective(400px) rotateY(180deg) rotateX(0deg); }
  75% { transform: perspective(400px) rotateY(360deg) rotateX(-10deg); }
  100% { transform: perspective(400px) rotateY(360deg) rotateX(0deg); }
}

/* Floating particles */
.adsk-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.adsk-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #0696D7;
  border-radius: 50%;
  filter: blur(1px);
  animation: adsk-particle-float 3s ease-in-out infinite;
}

.adsk-particle:nth-child(1) {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
  background: #0696D7;
}

.adsk-particle:nth-child(2) {
  top: 80%;
  left: 10%;
  animation-delay: 0.5s;
  background: #00bfa5;
}

.adsk-particle:nth-child(3) {
  top: 20%;
  right: 10%;
  animation-delay: 1s;
  background: #ff6b35;
}

.adsk-particle:nth-child(4) {
  bottom: 20%;
  right: 20%;
  animation-delay: 1.5s;
  background: #0696D7;
}

@keyframes adsk-particle-float {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-10px) scale(1.5);
    opacity: 1;
  }
}
.adsk-loader::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 255, 255, 0.15) 60deg,
    transparent 120deg
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: adsk-glow-spin 1.5s linear infinite;
}

@keyframes adsk-glow-spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.thinking-status-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.thinking-status-label {
  font-weight: 500;
  color: #ffffff;
  font-style: normal;
  font-size: 14px;
}

.thinking-status-step {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-style: normal;
}

/* Progress bar */
.thinking-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.thinking-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0696D7, #00bfa5, #0696D7);
  background-size: 200% 100%;
  border-radius: 0 0 0 12px;
  transition: width 0.3s ease;
  animation: adsk-progress-shimmer 1.5s ease-in-out infinite;
}

@keyframes adsk-progress-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Ambient glow behind loader */
.adsk-loader::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  background: radial-gradient(
    circle,
    rgba(6, 150, 215, 0.3) 0%,
    rgba(0, 191, 165, 0.1) 40%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: adsk-ambient-pulse 2s ease-in-out infinite;
}

@keyframes adsk-ambient-pulse {
  0%, 100% { 
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

.thinking-status-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thinking-status-label {
  font-weight: 600;
  color: #ffffff;
  font-style: normal;
  font-size: 15px;
  letter-spacing: 0.3px;
  transition: opacity 0.2s ease-in-out;
  min-width: 200px;
}

.thinking-status-label.fade-out {
  opacity: 0;
}

.tool-activity {
  margin: 16px 0;
}

/* Tool calls are hidden by default (use ?showToolCalls=true to show) */
body.hide-tools .tool-activity {
  display: none !important;
}

/* Make dates bold in messages */
.date-text {
  font-weight: 600;
}

/* Tool Calls Dropdown */
.tool-calls-dropdown {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f8f9fa;
  overflow: hidden;
}

.tool-calls-summary {
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0f2f5;
  font-weight: 500;
  font-size: 13px;
  transition: background 0.2s ease;
}

.tool-calls-summary:hover {
  background: #e8eaed;
}

.dropdown-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
  color: #5f6368;
}

.tool-calls-dropdown[open] .dropdown-icon {
  transform: rotate(0deg);
}

.tool-calls-dropdown:not([open]) .dropdown-icon {
  transform: rotate(-90deg);
}

.tool-calls-title {
  color: #5f6368;
}

.tool-calls-count {
  margin-left: auto;
  background: #0078d4;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

/* Tool Calls List */
.tool-calls-list {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  background: white;
}

.tool-call-item {
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
  animation: slideIn 0.3s ease;
}

.tool-call-item:last-child {
  margin-bottom: 0;
}

.tool-call-item.running {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
}

.tool-call-item.running .tool-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.tool-call-item.complete {
  background: #d4edda;
  border: 1px solid #c3e6cb;
}

.tool-call-item summary {
  cursor: pointer;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  color: #155724;
  list-style: none;
}

.tool-call-item.running summary {
  color: #856404;
}

.tool-call-item summary::-webkit-details-marker {
  display: none;
}

.tool-call-item summary:hover {
  background: rgba(0, 0, 0, 0.05);
}

.tool-name {
  font-family: 'Courier New', monospace;
  flex: 1;
}

.tool-duration {
  font-size: 11px;
  opacity: 0.7;
}

.dropdown-arrow {
  margin-left: auto;
  transition: transform 0.2s;
  font-size: 10px;
}

.tool-call-item[open] .dropdown-arrow {
  transform: rotate(180deg);
}

.tool-call-content {
  padding: 12px;
  background: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.tool-call-section {
  margin-bottom: 12px;
}

.tool-call-section:last-child {
  margin-bottom: 0;
}

.tool-call-label {
  font-weight: 600;
  font-size: 0.85em;
  color: #666;
  margin-bottom: 4px;
}

.tool-call-code {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  color: #333;
  max-height: 300px;
  overflow-y: auto;
}

.streaming-content {
  min-height: 20px;
}

.streaming-content p.error {
  color: #dc3545;
  font-weight: 500;
}

/* Cursor blink effect while streaming */
.streaming-content.streaming::after {
  content: '▋';
  animation: blink 1s step-end infinite;
  color: var(--accent);
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

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

/* ============================================
   SCROLLBAR
   ============================================ */
.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
  display: none !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
  /* Hide preview columns on smaller screens */
  .preview-column {
    display: none !important;
  }

  .main-content.chat-column {
    border-right: none;
  }

  .sidebar {
    width: 60px;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0 16px;
  }

  .sidebar {
    width: 0;
    overflow: hidden;
  }

  .page-header {
    padding: 16px 20px;
  }

  .chat-messages {
    padding: 20px 16px;
  }

  .composer {
    padding: 0 16px 20px 16px;
  }

  .message-content {
    max-width: 85%;
  }

  .main-content {
    min-width: 0;
  }
}
