/* ==========================================================================
   LumaAI — ChatGPT-like Vision & Chat Interface
   Theme: Luma Dark Aesthetics (Pure Black #000, Space Grotesk + Inter)
   ========================================================================== */

:root {
  --bg: #000000;
  --sidebar-bg: #070707;
  --surface-1: #0d0d0d;
  --surface-2: #141414;
  --surface-3: #1c1c1c;
  --border-1: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(255, 255, 255, 0.25);
  --text-1: #ffffff;
  --text-2: #a3a3a3;
  --text-3: #666666;
  --text-4: #3f3f3f;
  --accent: #ffffff;
  --accent-rgb: 255, 255, 255;
  --success: #22c55e;
  --danger: #ef4444;
  --fd: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --fb: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
  --sidebar-w: 270px;
  --header-h: 56px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
  --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--text-1);
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── CUSTOM SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* ─── MAIN APP CONTAINER ─── */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ─── AMBIENT BACKGROUND GLOW ─── */
.ambient-glow {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  height: 100%;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform var(--transition), margin-left var(--transition);
  z-index: 40;
  position: relative;
}

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

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

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fd);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-badge img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35));
}

.brand-badge span {
  color: var(--text-1);
}

.brand-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-weight: 500;
}

.sidebar-close-btn {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}

.sidebar-close-btn:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

/* New chat action */
.sidebar-action-wrap {
  padding: 12px 14px 8px;
}

.new-chat-btn {
  width: 100%;
  height: 40px;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.new-chat-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.new-chat-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.new-chat-shortcut {
  font-size: 11px;
  color: var(--text-3);
  padding: 2px 5px;
  background: var(--surface-2);
  border-radius: 4px;
  border: 1px solid var(--border-1);
}

/* Chat History List */
.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding: 14px 16px 8px;
}
.sidebar-history-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  transition: background var(--transition), color var(--transition);
  group: true;
}

.history-item:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

.history-item.active {
  background: var(--surface-2);
  color: var(--text-1);
  font-weight: 500;
  border-left: 2px solid #ffffff;
}

.history-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 6px;
}

.history-delete-btn {
  opacity: 0;
  color: var(--text-3);
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity var(--transition), color var(--transition);
}

.history-item:hover .history-delete-btn {
  opacity: 1;
}

.history-delete-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

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

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--sidebar-bg);
}

.model-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  font-size: 12px;
  color: var(--text-2);
}

.model-pill-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.back-to-site-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
}

.back-to-site-btn:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CHAT AREA
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-main {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: var(--bg);
  overflow: hidden;
  z-index: 10;
}

/* Header */
.chat-header {
  height: var(--header-h);
  border-bottom: 1px solid var(--border-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(0, 0, 0, 0.65);
  position: relative;
  z-index: 20;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-1);
  background: var(--surface-1);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.header-toggle-btn:hover {
  background: var(--surface-2);
  color: var(--text-1);
  border-color: var(--border-2);
}

.header-title-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fd);
  font-weight: 600;
  font-size: 15px;
}

.header-title-badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.chat-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.header-icon-btn:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

/* Messages Scroll Container */
.messages-container {
  flex: 1;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 140px;
}

.messages-inner {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ─── WELCOME / EMPTY STATE ─── */
.welcome-screen {
  width: 100%;
  max-width: 780px;
  margin: auto auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

.welcome-logo-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 70%, transparent 100%);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
  animation: pulseLogo 4s infinite alternate ease-in-out;
}

.welcome-logo-wrap img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
}

@keyframes pulseLogo {
  0% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 255, 255, 0.08); }
  100% { transform: scale(1.04); box-shadow: 0 0 50px rgba(255, 255, 255, 0.22); }
}

.welcome-title {
  font-family: var(--fd);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text-1);
}

.welcome-sub {
  font-size: 15px;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.5;
  margin-bottom: 32px;
}

/* Feature suggestion cards grid */
.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.action-card {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

.action-card:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.action-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-1);
}

.action-card-header span.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  color: var(--text-2);
  flex-shrink: 0;
  transition: all var(--transition);
}

.action-card:hover .action-card-header span.icon {
  background: var(--surface-3);
  border-color: var(--border-2);
  color: #ffffff;
}

.action-card-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}

/* ─── MESSAGE ROWS ─── */
.message-row {
  display: flex;
  gap: 14px;
  width: 100%;
  animation: messageIn 0.25s ease-out;
}

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

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

.message-bubble {
  max-width: 82%;
  position: relative;
}

.message-row.user .message-bubble {
  background-color: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 18px 18px 4px 18px;
  padding: 12px 16px;
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.55;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* User attached image thumbnail */
.user-msg-image-wrap {
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 260px;
  max-height: 260px;
  border: 1px solid var(--border-1);
  cursor: zoom-in;
}

.user-msg-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Assistant Message */
.assistant-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-1);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.1);
}

.assistant-avatar img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.message-row.assistant .message-bubble {
  flex: 1;
  background: transparent;
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.65;
}

/* Markdown styling inside assistant message */
.markdown-body {
  color: #ededed;
  font-size: 15px;
  line-height: 1.7;
}

.markdown-body p {
  margin-bottom: 12px;
}
.markdown-body p:last-child {
  margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  font-family: var(--fd);
  color: #fff;
  margin-top: 20px;
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.markdown-body h1 { font-size: 20px; }
.markdown-body h2 { font-size: 18px; }
.markdown-body h3 { font-size: 16px; }

.markdown-body strong {
  color: #fff;
  font-weight: 600;
}

.markdown-body ul,
.markdown-body ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

.markdown-body li {
  margin-bottom: 4px;
}

.markdown-body blockquote {
  border-left: 3px solid var(--border-2);
  padding-left: 12px;
  margin: 12px 0;
  color: var(--text-2);
  font-style: italic;
}

/* Tables */
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}
.markdown-body th,
.markdown-body td {
  border: 1px solid var(--border-1);
  padding: 8px 12px;
  text-align: left;
}
.markdown-body th {
  background: var(--surface-1);
  color: #fff;
  font-weight: 600;
}
.markdown-body tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Inline Code */
.markdown-body :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: 4px;
  color: #f1f1f1;
}

/* Code Blocks */
.code-block-wrap {
  margin: 14px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-1);
  background: #09090b;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #111113;
  border-bottom: 1px solid var(--border-1);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.code-copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-2);
  padding: 3px 7px;
  border-radius: 4px;
  transition: all var(--transition);
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.code-block-wrap pre {
  padding: 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.55;
  color: #e5e5e5;
}

/* KaTeX math formulas */
.katex-display {
  margin: 12px 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0;
}

/* Assistant Message Actions */
.msg-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 6px;
}

.msg-action-btn {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
}

.msg-action-btn:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

/* Typing / Thinking Animation */
.thinking-row {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.thinking-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-pill);
}

.thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: dotPulse 1.4s infinite ease-in-out both;
}

.thinking-dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-dot:nth-child(2) { animation-delay: -0.16s; }
.thinking-dot:nth-child(3) { animation-delay: 0; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1.1); opacity: 1; }
}

.thinking-text {
  font-size: 13px;
  color: var(--text-3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FLOATING INPUT CAPSULE (CHATGPT SIGNATURE DESIGN)
   ═══════════════════════════════════════════════════════════════════════════ */
.input-floating-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 16px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 60%, rgba(0, 0, 0, 0.6) 85%, transparent 100%);
  pointer-events: none;
  z-index: 30;
}

.input-capsule-container {
  pointer-events: auto;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: rgba(18, 18, 18, 0.88);
  border: 1px solid var(--border-2);
  border-radius: 24px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.input-capsule-container:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Image Attachment Preview Bar */
.attachment-preview-bar {
  padding: 10px 14px 4px;
  display: none;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-1);
}

.attachment-preview-bar.visible {
  display: flex;
}

.preview-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 4px 10px 4px 4px;
  position: relative;
}

.preview-chip-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-1);
}

.preview-chip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-chip-name {
  font-size: 12px;
  color: var(--text-1);
  font-weight: 500;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-chip-size {
  font-size: 10px;
  color: var(--text-3);
}

.preview-chip-remove {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  margin-left: 4px;
  transition: all var(--transition);
}

.preview-chip-remove:hover {
  background: var(--danger);
  color: #fff;
}

/* Input Row */
.input-row {
  display: flex;
  align-items: flex-end;
  padding: 8px 10px 8px 12px;
  gap: 8px;
}

.attach-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-bottom: 2px;
}

.attach-btn:hover {
  color: #fff;
  background: var(--surface-2);
}

.chat-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-1);
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  max-height: 200px;
  min-height: 36px;
  padding: 6px 0;
}

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

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-bottom: 2px;
  cursor: not-allowed;
}

.send-btn.active {
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
}

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

.send-btn.generating {
  background: #ffffff;
  color: #000000;
  cursor: pointer;
}

/* ─── FULLSCREEN DRAG & DROP OVERLAY ─── */
.drag-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  margin: 16px;
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.drag-overlay.active {
  display: flex;
}

.drag-icon {
  font-size: 48px;
  animation: bounce 1s infinite alternate;
}

.drag-text {
  font-family: var(--fd);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

/* ─── IMAGE LIGHTBOX MODAL ─── */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-2);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* ─── MOBILE BACKDROP ─── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 35;
}

.sidebar-backdrop.active {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.7);
    transform: translateX(-100%);
    margin-left: 0 !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: flex;
  }

  .action-cards-grid {
    grid-template-columns: 1fr;
  }

  .messages-container {
    padding: 16px 12px 140px;
  }

  .message-bubble {
    max-width: 92%;
  }

  .input-floating-bar {
    padding: 0 10px 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

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