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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Glassmorphism Dark Blue Materials */
.glass-card {
  background: rgba(13, 21, 38, 0.65);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 20px 50px -15px rgba(3, 7, 18, 0.7);
}

/* Deep Input Boxes */
.glass-input {
  background: rgba(8, 15, 30, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #f1f5f9;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: rgba(11, 20, 42, 0.85);
}

/* Glass Buttons with Hover Motion */
.glass-button-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: 1px solid rgba(147, 197, 253, 0.25);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  filter: brightness(1.08);
}

.glass-button-primary:active {
  transform: translateY(0);
}

.glass-button-secondary {
  background: rgba(30, 58, 138, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #e2e8f0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-button-secondary:hover {
  background: rgba(30, 58, 138, 0.4);
  border-color: rgba(59, 130, 246, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

/* Dynamic Smooth Animations */
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 0.5; }
}

.animate-pulse-glow {
  animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.96) translateY(4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.animate-pop-in {
  animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Conversation Stream Elements */
#messages { scroll-behavior: smooth; }

.msg-bubble { line-height: 1.6; font-size: 0.925rem; }
.msg-bubble p { margin-bottom: 0.75em; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble ul, .msg-bubble ol { margin: 0.5em 0 0.75em 1.25em; }
.msg-bubble ul { list-style: disc; }
.msg-bubble ol { list-style: decimal; }

.msg-bubble pre {
  background: #040812;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0.85em 0;
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
}

.msg-bubble code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
}

.msg-bubble :not(pre) > code {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 0.15em 0.4em;
  border-radius: 6px;
}

.code-block-wrapper { position: relative; }
.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  background: rgba(30, 58, 138, 0.4);
  color: #cbd5e1;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 4px 10px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s ease;
}
.copy-code-btn:hover { background: rgba(59, 130, 246, 0.4); color: #fff; }

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 8px;
}
.status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
  animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse { 0%,100%{opacity:.3} 50%{opacity:1} }

/* Sidebar Conversations */
.convo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #94a3b8;
}
.convo-item:hover {
  background: rgba(30, 58, 138, 0.25);
  color: #f1f5f9;
}
.convo-item.active {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-weight: 500;
}
.convo-item .convo-actions { display: none; gap: 4px; }
.convo-item:hover .convo-actions { display: flex; }

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.4); }