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

:root {
  --bg-main: #0b1414;
  --bg-sidebar: #111b1e;
  --bg-chat: #0b1414;
  --bg-bubble-in: #1e2c2f;
  --bg-bubble-out-agent: #05856b;
  --bg-bubble-out-human: #c2912e;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent: #10b981;
  --border: rgba(255, 255, 255, 0.06);
  --glass: rgba(17, 27, 30, 0.7);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, .font-display {
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

[x-cloak] { display: none !important; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
::-webkit-scrollbar-track { background: transparent; }

/* Animations */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-message {
  animation: slideIn 0.3s ease-out forwards;
}

/* Glassmorphism */
.glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
}

/* Chat Layout */
#thread {
  background-color: var(--bg-chat);
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}

.bubble {
  position: relative;
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.bubble:hover {
  transform: scale(1.01);
}

.bubble-in {
  background: var(--bg-bubble-in);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.bubble-out-agent {
  background: var(--bg-bubble-out-agent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bubble-out-human {
  background: var(--bg-bubble-out-human);
  color: #000;
  border-bottom-right-radius: 4px;
}

/* Inputs */
input, textarea {
  transition: all 0.2s;
  border: 1px solid transparent;
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Avatars */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  aside { width: 100% !important; position: absolute; z-index: 20; }
  main { width: 100% !important; }
}
