/* ═══════════════════════════════════════════════════════════
   PROMPT MANAGER — Premium Dark Design System
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --bg: #0b0d13;
  --bg-1: #0f1117;
  --bg-2: #14161f;
  --bg-3: #1c1f2b;
  --bg-4: #242736;

  --violet: #7c3aed;
  --violet-lite: #9f5df5;
  --violet-glow: rgba(124, 58, 237, 0.35);
  --cyan: #06b6d4;
  --cyan-lite: #22d3ee;

  /* mode colours */
  --chat-clr: #8b5cf6;
  --code-clr: #10b981;
  --image-clr: #f59e0b;
  --video-clr: #f43f5e;

  --text: #e8eaf0;
  --text-2: #9ca3af;
  --text-3: #6b7280;

  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);

  --radius: 14px;
  --radius-sm: 8px;
  --radius-xl: 22px;

  --sidebar-w: 260px;
}

/* ─── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  overflow: hidden;
  line-height: 1.6;
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--violet);
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(.4, 0, .2, 1);
  z-index: 10;
}

.sidebar.collapsed {
  margin-left: calc(-1 * var(--sidebar-w));
}

.sidebar-header {
  padding: 20px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 22px;
}

.logo-text {
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--violet-lite), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.new-chat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: var(--bg-3);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.new-chat-btn:hover {
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 0 16px var(--violet-glow);
}

.sidebar-label {
  padding: 16px 16px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

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

.history-empty {
  padding: 20px 12px;
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
}

.history-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 2px;
  border: 1px solid transparent;
}

.history-item:hover {
  background: var(--bg-3);
  border-color: var(--border);
}

.history-item.active {
  background: var(--bg-3);
  border-color: var(--violet);
}

.history-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-meta {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-mode-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-CHAT {
  background: var(--chat-clr);
}

.dot-CODE {
  background: var(--code-clr);
}

.dot-IMAGE {
  background: var(--image-clr);
}

.dot-VIDEO {
  background: var(--video-clr);
}

.dot-AUTO {
  background: var(--violet-lite);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.gemini-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.gemini-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

/* ═══════════════════════════════════════════════════════════
   MAIN AREA
   ═══════════════════════════════════════════════════════════ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

/* ─── Top bar ─────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  display: flex;
  align-items: center;
}

.sidebar-toggle:hover {
  background: var(--bg-3);
  color: var(--text);
}

.mode-indicator {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  width: fit-content;
  max-width: 220px;
}

.mode-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet);
  flex-shrink: 0;
  transition: background 0.3s;
  box-shadow: 0 0 6px currentColor;
}

.clear-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  display: flex;
  align-items: center;
}

.clear-btn:hover {
  border-color: var(--video-clr);
  color: var(--video-clr);
  background: rgba(244, 63, 94, 0.08);
}

/* ─── Chat area ───────────────────────────────────────────── */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 32px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

/* ─── Messages ────────────────────────────────────────────── */
.message {
  display: flex;
  gap: 12px;
  animation: msgIn 0.3s cubic-bezier(.4, 0, .2, 1) both;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  flex-direction: row-reverse;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.avatar-ai {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  box-shadow: 0 0 14px var(--violet-glow);
}

.avatar-user {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
}

.bubble {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14.5px;
  line-height: 1.7;
  max-width: calc(100% - 50px);
}

.bubble-ai {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px var(--radius) var(--radius) var(--radius);
  color: var(--text);
}

.bubble-user {
  background: linear-gradient(135deg, var(--violet) 0%, #5b21b6 100%);
  border-radius: var(--radius) 4px var(--radius) var(--radius);
  color: #fff;
  box-shadow: 0 4px 20px var(--violet-glow);
}

/* Rich AI bubble content */
.bubble-ai strong {
  color: var(--cyan-lite);
}

.bubble-ai em {
  color: var(--violet-lite);
  font-style: normal;
  font-weight: 500;
}

.bubble-ai .it-label {
  color: var(--image-clr);
  font-weight: 600;
}

.bubble-ai .en-label {
  color: var(--text-2);
  font-size: 13px;
}

.bubble-ai .question-item {
  padding: 10px 14px;
  margin: 8px 0;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--violet);
}

.bubble-ai .question-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--violet-lite);
  margin-bottom: 4px;
}

.bubble-ai .mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.chip-CHAT {
  background: rgba(139, 92, 246, 0.18);
  color: var(--chat-clr);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.chip-CODE {
  background: rgba(16, 185, 129, 0.18);
  color: var(--code-clr);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.chip-IMAGE {
  background: rgba(245, 158, 11, 0.18);
  color: var(--image-clr);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.chip-VIDEO {
  background: rgba(244, 63, 94, 0.18);
  color: var(--video-clr);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.chip-AUTO {
  background: var(--violet-glow);
  color: var(--violet-lite);
  border: 1px solid var(--violet);
}

.bubble-ai .prompt-preview {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.view-prompt-btn {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.view-prompt-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.55);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 14px 18px;
  align-items: center;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet-lite);
  animation: typingBounce 1.2s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0.7);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Progress bar */
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-4);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(.4, 0, .2, 1);
}

.progress-label {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

/* ─── Welcome screen ─────────────────────────────────────── */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 24px;
  padding: 40px 20px;
  text-align: center;
  animation: fadeIn 0.6s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.welcome-orb {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--violet), var(--cyan), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 0 40px var(--violet-glow);
  animation: spin 6s linear infinite;
}

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

.welcome-orb-inner {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.welcome-title {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--violet-lite), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-sub {
  font-size: 15px;
  color: var(--text-2);
  max-width: 480px;
}

.welcome-modes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.welcome-mode-pill {
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
  cursor: default;
}

.pill-chat {
  color: var(--chat-clr);
  border-color: var(--chat-clr);
  background: rgba(139, 92, 246, 0.08);
}

.pill-code {
  color: var(--code-clr);
  border-color: var(--code-clr);
  background: rgba(16, 185, 129, 0.08);
}

.pill-image {
  color: var(--image-clr);
  border-color: var(--image-clr);
  background: rgba(245, 158, 11, 0.08);
}

.pill-video {
  color: var(--video-clr);
  border-color: var(--video-clr);
  background: rgba(244, 63, 94, 0.08);
}

/* ─── Input area ──────────────────────────────────────────── */
.input-wrap {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
}

.input-box {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-box:focus-within {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-glow);
}

.mode-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.mode-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 0 24px 0 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  height: 100%;
  font-family: inherit;
  transition: all 0.2s;
}

.mode-select:hover {
  background: var(--bg-4);
  color: var(--text);
  border-color: var(--violet);
}

.mode-select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 2px var(--violet-glow);
}

.select-icon {
  position: absolute;
  right: 8px;
  pointer-events: none;
  color: var(--text-3);
}

.user-textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  resize: none;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.6;
}

.user-textarea::placeholder {
  color: var(--text-3);
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--violet), #5b21b6);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: 0 2px 10px var(--violet-glow);
}

.send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.55);
}

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

.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.skip-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.skip-btn:hover {
  background: var(--bg-4);
  color: var(--violet-lite);
  border-color: var(--violet);
  box-shadow: 0 2px 10px var(--violet-glow);
}

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

.skip-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.input-hint {
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  margin-top: 8px;
}

.input-hint kbd {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 780px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(124, 58, 237, 0.15);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(.4, 0, .2, 1);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.modal-mode-badge {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.badge-CHAT {
  background: rgba(139, 92, 246, 0.2);
  color: var(--chat-clr);
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.badge-CODE {
  background: rgba(16, 185, 129, 0.2);
  color: var(--code-clr);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-IMAGE {
  background: rgba(245, 158, 11, 0.2);
  color: var(--image-clr);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-VIDEO {
  background: rgba(244, 63, 94, 0.2);
  color: var(--video-clr);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.badge-AUTO {
  background: var(--violet-glow);
  color: var(--violet-lite);
  border: 1px solid var(--violet);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 0 14px var(--violet-glow);
}

.btn-copy.copied {
  background: var(--code-clr);
  border-color: var(--code-clr);
}

.modal-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  padding: 7px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
}

.modal-close:hover {
  border-color: var(--video-clr);
  color: var(--video-clr);
  background: rgba(244, 63, 94, 0.08);
}

.prompt-output {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.followup-btn {
  padding: 7px 16px;
  border-radius: 99px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.followup-btn:hover {
  background: var(--bg-4);
  border-color: var(--violet);
  color: var(--violet-lite);
}

/* ─── Inline code in AI bubbles ─────────────────────────── */
.inline-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--cyan-lite);
}

/* ─── Question number styling ────────────────────────────── */
.q-num {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: var(--violet-glow);
  border: 1px solid var(--violet);
  color: var(--violet-lite);
  font-size: 11px;
  font-weight: 700;
  margin-right: 4px;
  flex-shrink: 0;
}

/* ─── Extracted prompt notice inside bubble ──────────────── */
.extracted-prompt-notice {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--code-clr);
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-prompt-inline-btn {
  background: var(--code-clr);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.view-prompt-inline-btn:hover {
  opacity: 0.85;
}

/* ─── Example chips on welcome screen ───────────────────── */
.welcome-examples {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 600px;
  width: 100%;
}

.welcome-example-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.welcome-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.example-chip {
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.example-chip:hover {
  background: var(--bg-4);
  border-color: var(--violet);
  color: var(--text);
  transform: translateY(-1px);
}


/* ─── App shell layout fix ────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: row;
  flex: 1;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ──────────────────────────────────────────────────────────────────────────────
   Mobile Overlay
   ────────────────────────────────────────────────────────────────────────────── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }

  /* We don't use margin-left on mobile, we use transform for better performance */
  .sidebar.collapsed {
    margin-left: 0;
  }

  .chat-area {
    padding: 20px 14px;
  }

  .input-wrap {
    padding: 12px 14px 16px;
  }

  .modal {
    max-height: 92vh;
    border-radius: var(--radius);
  }

  .modal-footer {
    gap: 6px;
  }

  .followup-btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  .welcome-title {
    font-size: 22px;
  }
}