:root {
  --background: 222 47% 98%;
  --foreground: 230 28% 15%;
  --primary: 266 84% 58%;
  --secondary: 196 88% 44%;
  --muted: 220 22% 93%;
  --destructive: 0 72% 52%;
  --border: 225 25% 86%;
  --card: 0 0% 100%;

  --shadow-sm: 0 8px 20px hsla(266, 84%, 58%, 0.08);
  --shadow-md: 0 18px 40px hsla(235, 38%, 22%, 0.12);
  --shadow-lg: 0 28px 70px hsla(235, 38%, 22%, 0.18);

  --transition-fast: 120ms ease;
  --transition-smooth: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);

  --radius-sm: 0.625rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
}

.dark {
  --background: 231 33% 8%;
  --foreground: 220 20% 96%;
  --primary: 271 91% 68%;
  --secondary: 191 95% 60%;
  --muted: 228 20% 16%;
  --destructive: 0 77% 60%;
  --border: 228 19% 24%;
  --card: 230 28% 11%;

  --shadow-sm: 0 8px 20px hsla(271, 91%, 68%, 0.12);
  --shadow-md: 0 18px 40px hsla(230, 80%, 4%, 0.34);
  --shadow-lg: 0 28px 70px hsla(230, 80%, 4%, 0.48);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, hsla(266, 84%, 58%, 0.10), transparent 28%),
    radial-gradient(circle at bottom right, hsla(196, 88%, 44%, 0.12), transparent 32%),
    hsl(var(--background));
}

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

button, input, textarea {
  font: inherit;
}

::selection {
  background: hsla(266, 84%, 58%, 0.18);
}

.scrollbar-thin::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: hsla(225, 20%, 60%, 0.35);
  border-radius: 999px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.pulse-orb {
  background:
    radial-gradient(circle at 30% 30%, hsla(0, 0%, 100%, 0.9), transparent 28%),
    linear-gradient(135deg, hsla(266, 84%, 58%, 1), hsla(196, 88%, 44%, 1));
}

.glass {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.message-enter {
  animation: riseIn 180ms ease-out;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: hsl(var(--muted));
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, hsla(0, 0%, 100%, 0.45), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}