@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:       #040d16;
  --surface:  #071624;
  --surface2: #0a1b2c;
  --border:   rgba(255,255,255,0.07);
  --accent:   #c8ff00;
  --text:     #f0f0f0;
  --muted:    rgba(240,240,240,0.38);
  --red:      #f23f43;
  --sidebar:  240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
}

.hidden { display: none !important; }

.auth-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-box {
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.auth-logo {
  height: 58px;
  filter: brightness(1.05);
}

.auth-tagline {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-error {
  font-size: 12px;
  color: var(--red);
  min-height: 15px;
  text-align: center;
}

.chat-app {
  display: flex;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  position: relative;
}

.sidebar {
  width: var(--sidebar);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.24s ease, transform 0.24s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.chat-app.sidebar-collapsed .sidebar {
  width: 0;
  min-width: 0;
  transform: translateX(-14px);
  opacity: 0;
  pointer-events: none;
  border-right-color: transparent;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-top {
  padding: 20px 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-logo {
  height: 34px;
  align-self: center;
}

.sidebar-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.sidebar-icon-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--text);
}

.sidebar-close-btn {
  display: none;
}

.new-chat-btn {
  padding: 8px 12px;
  background: rgba(200,255,0,0.07);
  border: 1px solid rgba(200,255,0,0.18);
  border-radius: 8px;
  color: var(--accent);
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.2s;
}

.new-chat-btn:hover { background: rgba(200,255,0,0.13); }

.sessions-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sessions-list::-webkit-scrollbar       { width: 3px; }
.sessions-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.session-item {
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.session-item:hover  { background: var(--surface2); }
.session-item.active { background: rgba(200,255,0,0.07); }

.session-title {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.session-item.active .session-title { color: var(--text); }

.session-del {
  background: none;
  border: none;
  color: transparent;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.session-item:hover .session-del   { color: rgba(240,240,240,0.25); }
.session-item:hover .session-del:hover { color: var(--red); }

.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-username {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
  padding: 4px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.logout-btn:hover { border-color: var(--red); color: var(--red); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  border: none;
  background: rgba(0,0,0,0.56);
  opacity: 0;
  z-index: 18;
}

/* ── CHAT MAIN ──────────────────────────── */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  position: relative;
}

.chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(4,13,22,0.92);
  backdrop-filter: blur(8px);
}

.chat-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-toolbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-toolbar-logo {
  height: 28px;
  width: auto;
}

.chat-toolbar-title {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 22px 0 8px;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.messages::-webkit-scrollbar       { width: 3px; }
.messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Empty state */
.empty-state {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.22;
  user-select: none;
}

.empty-logo { height: 64px; }
.empty-text { font-size: 18px; font-weight: 700; letter-spacing: 5px; text-transform: uppercase; }
.empty-sub  { font-size: 11px; letter-spacing: 2px; color: var(--muted); }

.prompt-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 560px;
  margin-top: 12px;
}

.prompt-chip {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 9px 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.prompt-chip:hover {
  background: rgba(200,255,0,0.08);
  border-color: rgba(200,255,0,0.24);
  transform: translateY(-1px);
}

/* ── MESSAGES ───────────────────────────── */
.msg {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 6px 36px;
  display: flex;
  gap: 12px;
}

.msg-user { justify-content: flex-end; }

.msg-bubble {
  font-size: 14px;
  line-height: 1.7;
  max-width: 72%;
}

.msg-user .msg-bubble {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px 14px 2px 14px;
  padding: 10px 14px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-ai .msg-bubble { color: var(--text); max-width: 100%; }

.msg-streaming .msg-bubble {
  white-space: pre-wrap;
}

.msg-streaming .msg-bubble::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 2px;
  border-right: 2px solid rgba(200,255,0,0.65);
  vertical-align: -2px;
  animation: streamCaret 1s steps(1) infinite;
}

.msg-user-text {
  white-space: pre-wrap;
}

.user-attachments {
  display: grid;
  gap: 10px;
}

.user-attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px;
  min-width: 0;
}

.user-attachment.is-image {
  align-items: flex-start;
}

.user-attachment-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.06);
}

.user-attachment-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(200,255,0,0.08);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
}

.user-attachment-meta {
  min-width: 0;
  flex: 1;
}

.user-attachment-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-attachment-details {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

/* Markdown */
.msg-ai .msg-bubble h1,
.msg-ai .msg-bubble h2,
.msg-ai .msg-bubble h3 {
  color: var(--accent);
  font-size: 14px;
  margin: 14px 0 6px;
  letter-spacing: 0.3px;
}

.msg-ai .msg-bubble p        { margin-bottom: 8px; }
.msg-ai .msg-bubble p:last-child { margin-bottom: 0; }

.msg-ai .msg-bubble code {
  background: #091523;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent);
}

.msg-ai .msg-bubble pre {
  background: #071118;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.msg-ai .msg-bubble .code-block {
  position: relative;
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #071118;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #0a1622;
}

.code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
  padding: 7px 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.code-copy-btn:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: var(--text);
}

.code-copy-btn svg {
  width: 14px;
  height: 14px;
}

.code-lang {
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: lowercase;
  color: var(--muted);
}

.msg-ai .msg-bubble .code-block pre {
  margin: 0;
  border: none;
  border-radius: 0;
}

.msg-ai .msg-bubble pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
}

.msg-ai .msg-bubble ul,
.msg-ai .msg-bubble ol  { padding-left: 20px; margin: 6px 0; }
.msg-ai .msg-bubble li  { margin: 3px 0; }
.msg-ai .msg-bubble strong { color: var(--text); font-weight: 600; }
.msg-ai .msg-bubble a   { color: var(--accent); text-decoration: none; }
.msg-ai .msg-bubble a:hover { text-decoration: underline; }

.msg-ai .msg-bubble blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  color: var(--muted);
  margin: 8px 0;
  font-style: italic;
}

.msg-ai .msg-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
}

.msg-ai .msg-bubble th,
.msg-ai .msg-bubble td {
  padding: 7px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.msg-ai .msg-bubble th { background: var(--surface2); color: var(--accent); font-weight: 600; }

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 5px;
  padding: 6px 0;
  align-items: center;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--muted);
  border-radius: 50%;
  animation: tdot 1.3s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.typing-dots span:nth-child(3) { animation-delay: 0.36s; }

@keyframes tdot {
  0%, 60%, 100% { transform: translateY(0);   opacity: 0.35; }
  30%           { transform: translateY(-5px); opacity: 1;    }
}

@keyframes streamCaret {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* ── INPUT ──────────────────────────────── */
.input-area {
  padding: 12px 36px 22px;
}

.input-shell {
  max-width: 788px;
  margin: 0 auto;
}

.composer-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.composer-file {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.composer-file-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.06);
}

.composer-file-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(200,255,0,0.08);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
}

.composer-file-meta {
  min-width: 0;
  flex: 1;
}

.composer-file-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-file-details {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.composer-file-remove {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.composer-file-remove:hover {
  border-color: rgba(255,255,255,0.14);
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px 10px 16px;
  transition: border-color 0.2s;
}

.input-wrap:focus-within { border-color: rgba(200,255,0,0.22); }

/* Drag-and-drop overlay */
.chat-drop-zone {
  position: relative;
}
.chat-drop-zone.drag-over::after {
  content: 'Drop files here';
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(8,8,8,0.72);
  border: 2px dashed rgba(200,255,0,0.45);
  border-radius: 14px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.composer-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}

.composer-icon-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--text);
}

.composer-icon-btn:disabled {
  opacity: 0.32;
  cursor: default;
}

.input-wrap textarea {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  max-height: 160px;
  line-height: 1.55;
}

.input-wrap textarea::placeholder { color: var(--muted); }

#sendBtn {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #000;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

#sendBtn:hover    { opacity: 0.85; }
#sendBtn:disabled { opacity: 0.28; cursor: default; }

.composer-status {
  margin-top: 8px;
  padding: 0 2px;
  font-size: 11px;
  color: var(--muted);
}

.composer-status[data-state='error'] {
  color: var(--red);
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 320px);
    max-width: 320px;
    z-index: 20;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  }

  .chat-app.sidebar-collapsed .sidebar {
    width: min(82vw, 320px);
    transform: translateX(-100%);
    opacity: 0;
  }

  .chat-app.sidebar-mobile-open .sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .chat-app.sidebar-mobile-open .sidebar-overlay {
    opacity: 1;
  }

  .sidebar-close-btn {
    display: inline-flex;
  }

  .chat-toolbar {
    padding: 12px 16px 10px;
  }

  .messages {
    padding-top: 16px;
  }
}

@media (max-width: 640px) {
  .msg { padding: 6px 16px; }
  .input-area { padding: 10px 16px 18px; }
  .prompt-grid { max-width: 100%; }
  .prompt-chip { width: 100%; }
  .composer-file { align-items: flex-start; }
  .composer-file-remove { align-self: center; }
  .user-attachment-thumb { width: 60px; height: 60px; }
}

/* ── SESSION SEARCH ─────────────────────── */
.session-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 0 6px 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.session-search-icon {
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0.55;
}

.session-search {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  min-width: 0;
}

.session-search::placeholder { color: var(--muted); }

/* ── SESSION TAG ────────────────────────── */
.session-tag {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.3px;
  line-height: 1;
  padding: 0 3px;
  flex-shrink: 0;
  opacity: 0;
  transition: color 0.2s, opacity 0.2s;
}

.session-item:hover .session-tag { opacity: 1; }
.session-tag.has-tag { opacity: 1; }

/* ── COPY FULL RESPONSE ─────────────────── */
.copy-response-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.copy-response-btn:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: var(--text);
}

/* ── CUSTOM PROMPT CHIPS ────────────────── */
.prompt-chip-custom {
  position: relative;
  padding-right: 26px;
}

.chip-del {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--muted);
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  pointer-events: none;
}

.prompt-chip-custom:hover .chip-del {
  opacity: 1;
  pointer-events: auto;
  color: var(--red);
}

.prompt-chip-add {
  border-style: dashed;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.3px;
}

.prompt-chip-add:hover {
  background: rgba(200,255,0,0.05);
  border-color: rgba(200,255,0,0.22);
  color: var(--accent);
}

/* ── CUSTOM PROMPT MODAL ────────────────── */
.custom-prompt-modal {
  position: fixed;
  inset: 0;
  background: rgba(4,13,22,0.82);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-prompt-modal.hidden { display: none; }

.custom-prompt-dialog {
  width: min(360px, 92vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-prompt-header {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text);
}

.custom-prompt-input,
.custom-prompt-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  resize: none;
  transition: border-color 0.2s;
}

.custom-prompt-input:focus,
.custom-prompt-textarea:focus { border-color: rgba(200,255,0,0.3); }

.custom-prompt-input::placeholder,
.custom-prompt-textarea::placeholder { color: var(--muted); }

.custom-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.custom-prompt-btn-cancel {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.custom-prompt-btn-cancel:hover { border-color: rgba(255,255,255,0.14); color: var(--text); }

.custom-prompt-btn-save {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #000;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.custom-prompt-btn-save:hover { opacity: 0.88; }

/* ── STOP GENERATION (send btn state) ─── */
#sendBtn.is-stop {
  background: rgba(242,63,67,0.12);
  border: 1px solid rgba(242,63,67,0.28);
  color: var(--red);
}
#sendBtn.is-stop:hover { opacity: 1; background: rgba(242,63,67,0.2); }

/* ── SCROLL TO BOTTOM BUTTON ────────────── */
.scroll-bottom-btn {
  position: absolute;
  bottom: 142px;
  right: 28px;
  width: 36px;
  height: 36px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, background 0.2s, color 0.2s;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.scroll-bottom-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-bottom-btn:hover { background: var(--surface); color: var(--text); }

/* ── REGENERATE BUTTON ──────────────────── */
.regenerate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  margin-left: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.regenerate-btn:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: var(--text);
}
