/* Google Antigravity Clean Pixel-Perfect Design */
:root {
  --bg-app: #ffffff;
  --bg-sidebar: #f9fafb;
  --bg-sidebar-hover: #f1f3f5;
  --bg-active-pill: #e8edf5;
  --text-active-pill: #1e3a8a;
  --border-light: #e5e7eb;
  --border-subtle: #f0f2f5;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --brand-blue: #0071e3;
  --brand-blue-hover: #0062c4;
  --mic-red: #ea4335;
  --mic-red-pulse: rgba(234, 67, 53, 0.4);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background: var(--bg-app);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Main App Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* 1. Top Window Menu Bar */
.window-header {
  height: 40px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  user-select: none;
  z-index: 50;
}

.window-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.window-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-primary);
}

.window-menus {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.menu-item {
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.menu-item:hover {
  color: var(--text-primary);
  background: var(--bg-sidebar-hover);
}

.menu-item.bold-title {
  font-weight: 600;
  color: var(--text-primary);
}

.window-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 3px 10px;
  border-radius: 14px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.win-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win-btn:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-primary);
}

.win-btn.close:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* 2. Workspace Layout */
.workspace-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Left Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), width 0.25s ease;
  z-index: 40;
}

.sidebar.collapsed {
  width: 0;
  transform: translateX(-260px);
}

.sidebar-top {
  padding: 12px 14px 6px;
}

.btn-new-chat {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
}

.btn-new-chat:hover {
  background: #fdfdfd;
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.plus-icon {
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.sidebar-nav {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.nav-link:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-primary);
}

.projects-header {
  margin-top: 18px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.projects-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.projects-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-sidebar-hover);
}

/* Projects List */
.projects-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.project-item {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.project-item:hover {
  background: var(--bg-sidebar-hover);
}

.project-item.active {
  background: var(--bg-active-pill);
}

.project-item.active .project-name {
  color: var(--text-active-pill);
  font-weight: 600;
}

.project-top-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.folder-icon {
  font-size: 13px;
  color: #f59e0b;
}

.project-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.project-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-left: 20px;
}

.project-preview {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  max-width: 140px;
}

.project-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
}

.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-light);
}

.footer-btn {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.footer-btn:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-primary);
}

/* 3. Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

/* Content Toolbar (Breadcrumbs & Actions) */
.content-toolbar {
  height: 46px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #ffffff;
  z-index: 10;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  overflow: hidden;
}

.crumb-project {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
}

.crumb-sep {
  color: var(--text-muted);
}

.crumb-task {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-primary {
  background: var(--brand-blue);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
}

.btn-action-primary:hover {
  background: var(--brand-blue-hover);
}

.btn-action-outline {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-action-outline:hover {
  background: var(--bg-sidebar-hover);
  border-color: #cbd5e1;
}

.ide-logo {
  font-weight: 700;
  color: var(--brand-blue);
}

.btn-action-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-action-icon:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-primary);
}

/* Chat Feed */
.chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 24px 24px 140px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Message Styles */
.msg-user {
  background: #f9fafb;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 14.5px;
  color: var(--text-primary);
  line-height: 1.5;
  width: 100%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.msg-assistant {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-primary);
  padding: 4px 6px;
}

.msg-assistant h1, .msg-assistant h2, .msg-assistant h3 {
  margin: 16px 0 8px;
  font-weight: 600;
  color: #0f172a;
}

.msg-assistant p {
  margin-bottom: 12px;
}

.msg-assistant ul, .msg-assistant ol {
  margin: 8px 0 12px 22px;
}

.msg-assistant li {
  margin-bottom: 6px;
}

.msg-assistant a {
  color: #c53030;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.antigravity-quote {
  border-left: 3px double #94a3b8;
  border-right: 3px double #94a3b8;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 12px 18px;
  margin: 12px 0;
  font-size: 13.5px;
  color: #334155;
  border-radius: 6px;
  line-height: 1.5;
}

pre {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-x: auto;
  margin: 12px 0;
}

code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.msg-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-right: 4px;
}

.action-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 14px;
}

.action-icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-sidebar-hover);
}

/* 4. Floating Antigravity Chat Input Bar */
.chat-input-wrapper {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 30;
}

.input-card {
  width: 100%;
  max-width: 860px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  padding: 12px 16px;
  pointer-events: auto;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-card:focus-within {
  border-color: #cbd5e1;
  box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}

.voice-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.recording-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: rec-blink 1s infinite alternate;
}

@keyframes rec-blink {
  from { opacity: 0.3; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

.task-textarea {
  width: 100%;
  min-height: 38px;
  max-height: 140px;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text-primary);
  line-height: 1.45;
  background: transparent;
}

.task-textarea::placeholder {
  color: #9ca3af;
}

.input-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 4px;
}

.input-tools-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tool-btn-icon:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

.model-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.model-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.sparkle-icon {
  color: #f59e0b;
  font-size: 11px;
}

.caret-icon {
  font-size: 10px;
  color: var(--text-muted);
}

.input-tools-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Sparkle Pill Live Voice Button (Next to Mic) */
.btn-live-sparkle-pill {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  height: 32px;
  padding: 0 11px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-live-sparkle-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.55);
}

.btn-live-sparkle-pill.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.7);
  animation: live-pulse-pill 1.4s infinite alternate;
}

@keyframes live-pulse-pill {
  0% { box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); transform: scale(1); }
  100% { box-shadow: 0 0 16px rgba(16, 185, 129, 0.85); transform: scale(1.03); }
}

/* Red Circular Voice Button */
.btn-circle-mic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mic-red);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-circle-mic:hover {
  background: #d93829;
}

.btn-circle-mic.recording {
  animation: mic-pulse 0.9s infinite alternate;
  background: #b91c1c;
}

.btn-circle-mic.live-active {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4);
}

@keyframes mic-pulse {
  from { transform: scale(1); box-shadow: 0 0 0 0 var(--mic-red-pulse); }
  to { transform: scale(1.12); box-shadow: 0 0 0 10px var(--mic-red-pulse); }
}

/* Blue Circular Send Button */
.btn-circle-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-circle-send:hover {
  background: var(--brand-blue-hover);
  transform: scale(1.04);
}

/* 5. Files Drawer */
.files-drawer {
  position: absolute;
  top: 0;
  right: -320px;
  width: 320px;
  bottom: 0;
  background: #ffffff;
  border-left: 1px solid var(--border-light);
  box-shadow: -4px 0 20px rgba(0,0,0,0.06);
  z-index: 35;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
}

.files-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.file-row:hover {
  background: var(--bg-sidebar-hover);
}

.file-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  font-size: 12px;
}

.file-size {
  font-size: 11px;
  color: var(--text-muted);
}

/* 6. Modals & Overlays */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 500px;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-container-large {
  background: #ffffff;
  width: 95%;
  max-width: 1100px;
  height: 85vh;
  border-radius: 14px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-body-terminal {
  flex: 1;
  background: #000000;
}

.modal-body-terminal iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-item label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.account-card-active {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #166534;
}

.badge-active-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.badge-sub {
  font-size: 11px;
  background: #dcfce7;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
  font-weight: 500;
}

.setting-hint {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.setting-val {
  font-size: 13.5px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-primary);
}

.setting-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 13.5px;
  outline: none;
}

.badge-online {
  font-size: 11px;
  background: #dcfce7;
  color: #166534;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Dropdown Menus */
.dropdown-menu {
  position: absolute;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 120;
  min-width: 220px;
}

.dropdown-menu.active {
  display: flex;
}

.dropdown-item {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.dropdown-item:hover {
  background: var(--bg-sidebar-hover);
}

.dropdown-item.active {
  background: var(--bg-active-pill);
}

.dd-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.dd-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 7. Responsive Mobile Adaptations */
@media (max-width: 768px) {
  .window-menus {
    display: none;
  }

  .window-controls {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -280px;
    width: 280px;
    box-shadow: 6px 0 25px rgba(0,0,0,0.15);
  }

  .sidebar.open {
    transform: translateX(280px);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 35;
    display: none;
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .content-toolbar {
    padding: 0 12px;
  }

  .chat-feed {
    padding: 16px 14px 140px;
  }

  .chat-input-wrapper {
    padding: 0 10px;
    bottom: 12px;
  }

  .btn-action-outline span:not(.ide-logo) {
    display: none;
  }

  .files-drawer {
    width: 100%;
    right: -100%;
  }
}


/* ========================================================
   ENHANCEMENTS & 10 FEATURES STYLES
   ======================================================== */

/* Light / Dark Theme Support */
body.light-theme {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #e5e5ea;
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --border-color: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
}

body.light-theme .window-header,
body.light-theme .sidebar,
body.light-theme .main-content {
  background: var(--bg-secondary);
  color: var(--text-main);
}

body.light-theme .input-card {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

body.light-theme .task-textarea {
  color: #1d1d1f;
}

/* Win Icon Btn */
.win-icon-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}
.win-icon-btn:hover {
  background: rgba(255,255,255,0.1);
}

.caret-down {
  font-size: 10px;
  margin-left: 2px;
  opacity: 0.7;
}

/* Git Badge in Toolbar */
.git-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
}
.git-icon {
  font-size: 13px;
  color: #ff9f0a;
}
.git-changes {
  background: #ff9f0a;
  color: #000;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
}

/* Quick Chips Bar */
.quick-chips-bar {
  display: flex;
  gap: 6px;
  padding: 6px 12px 2px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.quick-chips-bar::-webkit-scrollbar { display: none; }
.quick-chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.quick-chip:hover {
  background: rgba(255,255,255,0.15);
  color: var(--text-main);
  border-color: rgba(255,255,255,0.3);
}

/* Voice Waveform Animation */
.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 16px;
  margin-right: 6px;
}
.voice-wave .bar {
  width: 3px;
  height: 100%;
  background: #ff453a;
  border-radius: 2px;
  animation: wavePulse 0.8s ease-in-out infinite alternate;
}
.voice-wave .bar:nth-child(2) { animation-delay: 0.2s; }
.voice-wave .bar:nth-child(3) { animation-delay: 0.4s; }
.voice-wave .bar:nth-child(4) { animation-delay: 0.1s; }

@keyframes wavePulse {
  0% { height: 4px; }
  100% { height: 16px; }
}

/* Accounts Manager Modal Styles */
.accounts-header-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.accounts-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 16px;
}
.account-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: border-color 0.15s;
}
.account-item-card.is-active {
  border-color: #30d158;
  background: rgba(48, 209, 88, 0.08);
}
.account-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0071e3, #40c4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}
.account-meta {
  display: flex;
  flex-direction: column;
}
.account-email {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}
.account-tier {
  font-size: 11px;
  color: var(--text-muted);
}
.account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-active-pill {
  background: #30d158;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.btn-switch-account {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-switch-account:hover {
  background: #0071e3;
  color: #fff;
  border-color: #0071e3;
}

.add-account-section {
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--border-color);
  padding: 12px;
  border-radius: 10px;
}
.add-account-section .section-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}
.link-btn {
  background: transparent;
  border: none;
  color: #0a84ff;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(255, 69, 58, 0.4);
  color: #ff453a;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.btn-danger-outline:hover {
  background: rgba(255, 69, 58, 0.15);
}

/* Code Editor Textarea */
.code-editor-area {
  flex: 1;
  width: 100%;
  height: 500px;
  background: #141417;
  color: #f5f5f7;
  font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 14px;
  border: none;
  outline: none;
  resize: none;
  white-space: pre;
  tab-size: 4;
}

/* History Card */
.history-item-card {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s;
}
.history-item-card:hover {
  background: rgba(255,255,255,0.05);
}
.history-task-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}
.history-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}


/* ========================================================
   AUXILIARY RIGHT PANE (SUBAGENTS, ARTIFACTS, DIFF, TERMINAL)
   ======================================================== */
.auxiliary-pane {
  width: 0;
  overflow: hidden;
  background: #141417;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 40;
}

.auxiliary-pane.open {
  width: 420px;
}

@media (max-width: 900px) {
  .auxiliary-pane.open {
    position: fixed;
    top: 48px;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 60;
  }
}

.aux-header {
  height: 48px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: rgba(28, 28, 30, 0.95);
}

.aux-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.aux-tabs::-webkit-scrollbar { display: none; }

.aux-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.aux-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}
.aux-tab-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.aux-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}
.aux-close-btn:hover { color: var(--text-main); }

.aux-body {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.aux-tab-content {
  display: none;
  height: 100%;
  padding: 14px;
}
.aux-tab-content.active {
  display: block;
}

.aux-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Subagent Cards */
.subagent-tree-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.subagent-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
}
.subagent-card.child {
  margin-left: 20px;
  border-left: 2px solid #0071e3;
}
.subagent-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-main);
}
.subagent-badge-parent {
  background: #0071e3;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.subagent-badge-child {
  background: #30d158;
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.subagent-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: auto;
}
.subagent-status-dot.online { background: #30d158; }
.subagent-status-dot.idle { background: #8e8e93; }

.subagent-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.subagent-model {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: #0a84ff;
  margin-top: 2px;
}

/* Artifacts List */
.artifacts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.artifact-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.artifact-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.artifact-title {
  font-size: 13px;
  font-weight: 600;
  color: #0a84ff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.artifact-preview {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Diff Viewer */
.diff-viewer-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.diff-file-block {
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}
.diff-file-header {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}
.diff-code-body {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.5;
  overflow-x: auto;
  padding: 8px 0;
  margin: 0;
}
.diff-line {
  padding: 1px 12px;
  white-space: pre;
}
.diff-line.added {
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
}
.diff-line.removed {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}
.diff-line.info {
  color: #0a84ff;
}

/* Auxiliary Terminal */
.aux-terminal-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* ========================================================
   SLASH COMMANDS AUTOCOMPLETE POPUP
   ======================================================== */
.slash-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 12px;
  right: 12px;
  max-width: 480px;
  background: rgba(28, 28, 30, 0.98);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  z-index: 50;
  overflow: hidden;
}

.slash-popup-header {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.slash-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.slash-item:hover, .slash-item.active {
  background: rgba(0, 113, 227, 0.25);
}
.slash-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #40c4ff;
}
.slash-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========================================================
   THINKING PROCESS ACCORDION & TOOL CALL CARDS
   ======================================================== */
.thinking-accordion {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.thinking-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.thinking-header:hover {
  color: var(--text-main);
}

.thinking-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #0a84ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.thinking-chevron {
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.2s ease;
}
.thinking-accordion.open .thinking-chevron {
  transform: rotate(180deg);
}

.thinking-body {
  display: none;
  padding: 10px 14px 14px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #8e8e93;
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}
.thinking-accordion.open .thinking-body {
  display: block;
}

/* Tool Call Pills */
.tool-call-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 8px;
}
.tool-call-badge {
  background: #ff9f0a;
  color: #000;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}
.tool-call-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-main);
}

/* GitHub Alerts */
.antigravity-alert {
  padding: 10px 14px;
  border-left: 3px solid #0071e3;
  background: rgba(0, 113, 227, 0.08);
  border-radius: 0 8px 8px 0;
  margin: 10px 0;
  font-size: 13px;
}
.antigravity-alert.important {
  border-left-color: #af52de;
  background: rgba(175, 82, 222, 0.08);
}
.antigravity-alert.warning {
  border-left-color: #ff9f0a;
  background: rgba(255, 159, 10, 0.08);
}
.antigravity-alert.tip {
  border-left-color: #30d158;
  background: rgba(48, 209, 88, 0.08);
}


/* ========================================================
   GEMINI LIVE VOICE BRAINSTORM OVERLAY & ORB STYLES
   ======================================================== */

.btn-live-sparkle {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
  transition: all 0.2s ease;
}
.btn-live-sparkle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.55);
}
.btn-live-sparkle.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
}

.live-dot-pulse {
  width: 7px;
  height: 7px;
  background: #40c4ff;
  border-radius: 50%;
  animation: liveDotPulse 1.2s infinite alternate;
}
@keyframes liveDotPulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

/* Modal Live Container */
.modal-container-live {
  width: 90%;
  max-width: 640px;
  height: 82vh;
  max-height: 720px;
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.8), 0 0 40px rgba(124, 58, 237, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.live-modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 19, 26, 0.8);
  backdrop-filter: blur(16px);
}
.live-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-header-icon {
  font-size: 18px;
  color: #a855f7;
}
.live-voice-selector {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #38bdf8;
  padding: 4px 10px;
  border-radius: 12px;
}

.live-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px;
  overflow-y: auto;
}

/* Glowing Soundwave Plasma Orb */
.live-orb-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  height: 160px;
}

.live-orb {
  width: 110px;
  height: 110px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-core {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #60a5fa, #8b5cf6 50%, #4338ca 100%);
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.7), inset 0 0 15px rgba(255, 255, 255, 0.5);
  animation: orbFloat 3s ease-in-out infinite alternate;
}

.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(168, 85, 247, 0.3);
}

.orb-ring.ring-1 {
  width: 100px;
  height: 100px;
  animation: ringPulse 2s ease-in-out infinite;
}
.orb-ring.ring-2 {
  width: 125px;
  height: 125px;
  animation: ringPulse 2.6s ease-in-out infinite 0.4s;
}
.orb-ring.ring-3 {
  width: 150px;
  height: 150px;
  animation: ringPulse 3.2s ease-in-out infinite 0.8s;
}

.live-orb.speaking .orb-core {
  animation: orbSpeaking 0.6s ease-in-out infinite alternate;
  box-shadow: 0 0 55px rgba(56, 189, 248, 0.9), inset 0 0 25px rgba(255, 255, 255, 0.8);
}
.live-orb.listening .orb-core {
  animation: orbListening 1s ease-in-out infinite alternate;
  box-shadow: 0 0 45px rgba(168, 85, 247, 0.8);
}

@keyframes orbFloat {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.04); }
}
@keyframes ringPulse {
  0% { transform: scale(0.85); opacity: 0.1; }
  50% { opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0; }
}
@keyframes orbSpeaking {
  0% { transform: scale(0.92); filter: hue-rotate(0deg); }
  100% { transform: scale(1.12); filter: hue-rotate(45deg); }
}
@keyframes orbListening {
  0% { transform: scale(0.95); }
  100% { transform: scale(1.08); }
}

.live-status-text {
  font-size: 15px;
  font-weight: 500;
  color: #e2e8f0;
  text-align: center;
  margin-bottom: 16px;
  min-height: 24px;
}

/* Dialog Box */
.live-dialog-box {
  width: 100%;
  flex: 1;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.live-msg-bubble {
  max-width: 88%;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}
.live-msg-bubble.user {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 3px;
}
.live-msg-bubble.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-bottom-left-radius: 3px;
}

/* Live Modal Footer */
.live-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 19, 26, 0.8);
}
.live-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-live-mic {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.btn-live-mic.active {
  background: #3b82f6;
  border-color: #60a5fa;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.btn-transfer-antigravity {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 14px rgba(16, 185, 129, 0.4);
  transition: all 0.15s ease;
}
.btn-transfer-antigravity:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
}

/* Volume VU Meter */
.live-volume-meter {
  width: 140px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin: 6px auto 14px auto;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.live-volume-bar {
  width: 0%;
  height: 100%;
  background: #3b82f6;
  border-radius: 6px;
  transition: width 0.08s ease, background 0.2s ease;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
}

/* Quick text input in live modal */
.live-input-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.live-text-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 9px 14px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.live-text-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: #60a5fa;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.25);
}

.live-text-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12.5px;
}

.btn-live-send {
  background: #3b82f6;
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-live-send:hover {
  background: #2563eb;
  transform: scale(1.05);
}

/* Breadcrumb Rename Button */
.btn-crumb-rename {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.6;
  transition: opacity 0.2s, background 0.2s;
}
.btn-crumb-rename:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

/* Project Item Rename Button */
.project-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-proj-rename {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 2px 4px;
}
.project-item:hover .btn-proj-rename {
  opacity: 0.7;
}
.btn-proj-rename:hover {
  opacity: 1;
}

/* Tools (+) Popup Menu */
.tools-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 10px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  width: 320px;
  max-width: calc(100vw - 32px);
  z-index: 1000;
  overflow: hidden;
  animation: slideUpFade 0.15s ease-out;
}
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.tools-popup-title {
  padding: 10px 14px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}
.tool-popup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
}
.tool-popup-item:hover {
  background: #f1f5f9;
}
.tool-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
}
.tool-info {
  display: flex;
  flex-direction: column;
}
.tool-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}
.tool-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* Antigravity Process Display Cards (Accordion) */
.antigravity-process-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.process-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
}
.process-spinner {
  display: inline-block;
  animation: spinSlow 2s linear infinite;
  color: #2563eb;
  font-size: 15px;
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.process-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #64748b;
  padding: 4px 0;
}
.process-step.active {
  color: #1d4ed8;
  font-weight: 500;
}
.process-step.done {
  color: #059669;
}
.step-status {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}
.process-step.active .step-status {
  background: #dbeafe;
  color: #1e40af;
}

/* Completed Process Accordion */
.antigravity-process-accordion {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
.antigravity-process-accordion summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #334155;
  user-select: none;
}
.process-summary-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  background: #dcfce7;
  color: #166534;
  padding: 2px 8px;
  border-radius: 12px;
}
.process-details-body {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.terminal-drawer {
  margin-top: 8px;
  background: #0f172a;
  border-radius: 8px;
  padding: 8px 12px;
}
.terminal-drawer summary {
  cursor: pointer;
  color: #38bdf8;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
}
.terminal-drawer pre {
  margin: 8px 0 0 0;
  padding: 0;
  background: transparent;
  max-height: 250px;
  overflow-y: auto;
  font-size: 12px;
  color: #f1f5f9;
}

/* Chat Terminal Execution Card */
.terminal-chat-card {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 6px;
  font-family: var(--font-mono);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.terminal-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.terminal-chat-title code {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.terminal-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.terminal-badge.badge-ok {
  background: #059669;
  color: #ecfdf5;
}
.terminal-badge.badge-err {
  background: #dc2626;
  color: #fef2f2;
}

.terminal-chat-output {
  padding: 12px;
  margin: 0;
  max-height: 280px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: #cbd5e1;
}

.terminal-chat-actions {
  display: flex;
  justify-content: flex-end;
  padding: 6px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

/* Browser Modal Styles */
.modal-container-browser {
  width: 92vw;
  max-width: 1100px;
  height: 85vh;
  display: flex;
  flex-direction: column;
}

.browser-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.browser-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  margin-right: 12px;
}

.browser-btn {
  background: var(--bg-card-secondary, #f3f4f6);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.browser-btn:hover {
  background: var(--border-color);
}

.browser-url-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  background: var(--bg-input, #ffffff);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 3px 8px;
  gap: 6px;
}

.browser-url-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  font-family: var(--font-mono);
}

.browser-go-btn {
  background: var(--brand-blue);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.browser-quick-links {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.quick-link-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.quick-link-chip:hover {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

.modal-body-browser {
  flex: 1;
  position: relative;
  background: #ffffff;
  overflow: hidden;
}

#browserIframe {
  width: 100%;
  height: 100%;
  border: none;
}

.browser-screenshot-view {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #1e293b;
}

#browserScreenshotImg {
  max-width: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.browser-agent-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  z-index: 10;
}

.browser-agent-status {
  background: #1e293b;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}

/* Cloud Chromium Stream Canvas */
.browser-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

#browserStreamCanvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: crosshair;
  background: #1e293b;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.browser-stream-loader {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 500;
  z-index: 15;
  backdrop-filter: blur(4px);
}

.stream-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}


