:root {
  --bg-deep: #0a0a1a;
  --bg-main: #0f0f24;
  --bg-surface: #161638;
  --bg-elevated: #1e1e4a;
  --accent-primary: #00e5a0;
  --accent-secondary: #7c3aed;
  --accent-glow: rgba(0, 229, 160, 0.15);
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #55557a;
}

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

html, body, #root {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: 'Bricolage Grotesque', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-secondary); }

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

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50% { box-shadow: 0 0 24px var(--accent-glow), 0 0 48px rgba(0, 229, 160, 0.05); }
}

@keyframes bounce-in {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

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

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes particle-float {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.msg-enter {
  animation: fadeSlideUp 0.3s ease-out forwards;
}

.system-msg-enter {
  animation: fadeIn 0.4s ease-out forwards;
}

.bounce-btn {
  animation: float 3s ease-in-out infinite;
}

.glow-border {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* Particles background */
.particle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  animation: particle-float linear infinite;
  z-index: 0;
}

/* Send button animation */
.send-fly {
  animation: bounce-in 0.3s ease-out;
}

/* Color picker ring */
.color-ring {
  transition: all 0.2s ease;
}
.color-ring:hover {
  transform: scale(1.2);
}
.color-ring.selected {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px var(--bg-deep), 0 0 0 5px currentColor;
}

/* Input glow */
.input-glow:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-primary), 0 0 20px rgba(0, 229, 160, 0.1);
}

/* Sidebar overlay */
.sidebar-overlay {
  animation: fadeIn 0.2s ease-out;
}

.sidebar-panel {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* New messages pill */
.new-msg-pill {
  animation: bounce-in 0.3s ease-out;
}

/* Mobile keyboard handling */
@media (max-height: 500px) {
  .chat-header { padding: 8px 16px !important; }
}