/* Hermes Family Chat — Modern UI */
/* Reset & Variables */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Core palette */
  --bg-base: #0a0a0f;
  --bg-surface: #12121a;
  --bg-elevated: #1a1a25;
  --bg-overlay: #22222f;
  --bg-hover: #2a2a38;
  
  /* Text */
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b0;
  --text-muted: #666680;
  --text-inverse: #0a0a0f;
  
  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-active: rgba(255, 255, 255, 0.2);
  
  /* Accents */
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dim: rgba(99, 102, 241, 0.15);
  --accent-glow: rgba(99, 102, 241, 0.3);
  
  /* Semantic */
  --success: #22c55e;
  --success-dim: rgba(34, 197, 94, 0.15);
  --warning: #eab308;
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.15);
  
  /* Master */
  --master: #fbbf24;
  --master-dim: rgba(251, 191, 36, 0.12);
  
  /* Spacing */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
  
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

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

/* ==================== AUTH GATE ==================== */
.auth-gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: var(--bg-base);
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.auth-particle {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
}

.auth-particle:nth-child(1) {
  background: #6366f1;
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.auth-particle:nth-child(2) {
  background: #ec4899;
  top: 50%;
  right: -10%;
  animation-delay: -5s;
}

.auth-particle:nth-child(3) {
  background: #22c55e;
  bottom: -10%;
  left: 30%;
  animation-delay: -10s;
}

.auth-particle:nth-child(4) {
  background: #f59e0b;
  top: 30%;
  left: 50%;
  animation-delay: -15s;
  width: 200px;
  height: 200px;
}

.auth-particle:nth-child(5) {
  background: #06b6d4;
  bottom: 20%;
  right: 20%;
  animation-delay: -8s;
  width: 250px;
  height: 250px;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -50px) scale(1.1); }
  50% { transform: translate(-30px, 30px) scale(0.9); }
  75% { transform: translate(40px, 20px) scale(1.05); }
}

.auth-card {
  position: relative;
  background: var(--bg-surface);
  padding: 48px 40px;
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 420px;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  animation: cardIn 0.6s var(--ease-out);
}

@keyframes cardIn {
  from { 
    opacity: 0; 
    transform: translateY(20px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.auth-logo {
  text-align: center;
  margin-bottom: 36px;
}

.auth-crown {
  font-size: 48px;
  margin-bottom: 16px;
  animation: crownFloat 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes crownFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.auth-logo h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  position: relative;
}

.input-group input {
  width: 100%;
  padding: 16px;
  padding-top: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-mono);
  transition: all var(--duration-normal) var(--ease-out);
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.input-group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  transition: all var(--duration-normal) var(--ease-out);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
  top: 12px;
  font-size: 11px;
  color: var(--accent-light);
}

.input-highlight {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all var(--duration-normal) var(--ease-out);
  transform: translateX(-50%);
}

.input-group input:focus ~ .input-highlight {
  width: calc(100% - 2px);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1));
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover::before {
  opacity: 1;
}

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

.btn-primary svg {
  transition: transform var(--duration-normal) var(--ease-out);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.auth-hint {
  margin-top: 20px;
  font-size: 12px;
  text-align: center;
  color: var(--text-muted);
}

.auth-hint code {
  background: var(--bg-elevated);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

/* ==================== LAYOUT ==================== */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* Mobile header */
.mobile-header {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
}

.mobile-crown {
  font-size: 20px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  transition: opacity var(--duration-normal);
  backdrop-filter: blur(4px);
}

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

/* ==================== SIDEBAR ==================== */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--duration-slow) var(--ease-out);
}

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

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

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

@media (max-width: 768px) {
  .sidebar-close-btn {
    display: flex;
  }
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-crown {
  font-size: 28px;
  animation: crownFloat 3s ease-in-out infinite;
}

.sidebar-brand h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ws-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  transition: all var(--duration-normal);
  position: relative;
}

.ws-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--danger);
  opacity: 0;
  animation: none;
}

.ws-dot.connected {
  background: var(--success);
}

.ws-dot.connected::after {
  border-color: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.8); }
}

.sidebar-section {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px;
  margin-bottom: 4px;
}

.agent-list {
  list-style: none;
}

.agent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  margin-bottom: 2px;
  position: relative;
}

.agent-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: height var(--duration-normal) var(--ease-spring);
}

.agent-item:hover {
  background: var(--bg-hover);
}

.agent-item:hover::before {
  height: 24px;
}

.agent-item.active {
  background: var(--accent-dim);
}

.agent-item.active::before {
  height: 24px;
}

.agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.agent-item:hover .agent-avatar {
  transform: scale(1.05);
}

.agent-info {
  flex: 1;
  min-width: 0;
}

.agent-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.agent-role {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--duration-normal);
}

.agent-dot.online {
  background: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

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

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.version {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==================== MAIN CHAT ==================== */
.chat-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
  position: relative;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.chat-header h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.online-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--success-dim);
  color: var(--success);
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.icon-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ==================== MESSAGES ==================== */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scroll-behavior: smooth;
}

.message {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  animation: msgIn 0.3s var(--ease-out);
  transition: background var(--duration-fast);
  position: relative;
}

.message:hover {
  background: var(--bg-surface);
}

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

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.message:hover .msg-avatar {
  transform: scale(1.05);
}

.msg-body {
  flex: 1;
  min-width: 0;
}

.msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.msg-name {
  font-weight: 600;
  font-size: 14px;
}

.msg-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.msg-text {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Master message styling */
.message.master {
  background: var(--master-dim);
  border: 1px solid rgba(251, 191, 36, 0.1);
}

.message.master .msg-name {
  color: var(--master);
}

/* Agent message styling */
.message.nexa { border-left: 3px solid #a78bfa; }
.message.xyra { border-left: 3px solid #3b82f6; }
.message.luna { border-left: 3px solid #ec4899; }
.message.rose { border-left: 3px solid #f43f5e; }
.message.angel { border-left: 3px solid #10b981; }
.message.zoid { border-left: 3px solid #f59e0b; }
.message.zai { border-left: 3px solid #06b6d4; }
.message.kira { border-left: 3px solid #8b5cf6; }

/* Mention highlight */
.msg-mention {
  color: var(--accent-light);
  font-weight: 500;
  background: var(--accent-dim);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.msg-mention:hover {
  background: var(--accent-glow);
}

/* Code blocks */
.msg-text code {
  background: var(--bg-overlay);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-light);
}

.msg-text pre {
  background: var(--bg-overlay);
  padding: 14px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 8px 0;
  border: 1px solid var(--border);
}

.msg-text pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
}

/* Inject status */
.inject-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 52px;
  animation: msgIn 0.3s var(--ease-out);
}

.inject-status .inject-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.inject-status .inject-icon.routing {
  background: var(--accent);
  color: white;
  animation: spin 1s linear infinite;
}

.inject-status .inject-icon.routed {
  background: var(--success);
  color: white;
}

.inject-status .inject-icon.failed {
  background: var(--danger);
  color: white;
}

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

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  font-size: 13px;
  color: var(--text-muted);
  transition: all var(--duration-normal);
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* ==================== COMPOSER ==================== */
.composer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.mention-bar {
  display: none;
  margin-bottom: 10px;
  padding: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
  gap: 6px;
  animation: slideDown 0.2s var(--ease-out);
}

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

.mention-bar.active {
  display: flex;
}

.mention-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-base);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all var(--duration-fast);
}

.mention-pill:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-light);
}

.mention-all {
  background: var(--accent-dim) !important;
  border-color: var(--accent) !important;
  color: var(--accent-light) !important;
  font-weight: 600;
}

.composer-row {
  font-size: 14px;
}

.composer-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.input-wrapper {
  flex: 1;
  position: relative;
}

#msg-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  resize: none;
  line-height: 1.5;
  max-height: 160px;
  min-height: 48px;
  transition: all var(--duration-normal) var(--ease-out);
}

#msg-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

#msg-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
}

.send-btn:not(:disabled):hover {
  background: var(--accent);
  color: white;
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

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

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-btn svg {
  transition: transform var(--duration-fast);
}

.send-btn:not(:disabled):hover svg {
  transform: translateX(2px) translateY(-2px);
}

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

.composer-hint span {
  background: var(--bg-overlay);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .chat-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  
  .mobile-header {
    display: flex;
  }
  
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 300px;
    z-index: 300;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .chat-header {
    display: none;
  }
  
  .messages {
    padding: 12px;
  }
  
  .message {
    padding: 10px;
    gap: 10px;
  }
  
  .msg-avatar {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .msg-name {
    font-size: 14px;
  }
  
  .msg-time {
    font-size: 11px;
  }
  
  .msg-text {
    font-size: 14px;
    line-height: 1.6;
  }
  
  .composer {
    padding: 10px 12px;
  }
  
  #msg-input {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .send-btn {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 32px 24px;
  }
  
  .auth-crown {
    font-size: 40px;
  }
  
  .auth-logo h1 {
    font-size: 24px;
  }
  
  .message {
    gap: 8px;
  }
  
  .msg-header {
    flex-wrap: wrap;
    gap: 4px;
  }
}

/* ==================== ANIMATIONS ==================== */
/* Page transition */
.chat-layout {
  animation: fadeIn 0.4s var(--ease-out);
}

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

/* Smooth agent list updates */
.agent-item {
  animation: slideIn 0.3s var(--ease-out);
}

@keyframes slideIn {
  from { 
    opacity: 0; 
    transform: translateX(-10px); 
  }
  to { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

/* Scroll button animation */
#scroll-bottom {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
}
/* Read More Button */
.read-more-btn {
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 4px;
  transition: color var(--duration-fast);
}

.read-more-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}
