:root {
  --background: 222 39% 97%;
  --foreground: 230 24% 14%;
  --primary: 267 84% 61%;
  --secondary: 192 84% 54%;
  --muted: 225 24% 92%;
  --destructive: 0 78% 58%;
  --border: 226 18% 84%;
  --card: 0 0% 100%;

  --shadow-sm: 0 8px 24px rgba(39, 23, 80, 0.06);
  --shadow-md: 0 18px 40px rgba(42, 26, 88, 0.12);
  --shadow-lg: 0 24px 80px rgba(48, 30, 100, 0.18);

  --transition-fast: 160ms ease;
  --transition-smooth: 320ms cubic-bezier(0.22, 1, 0.36, 1);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

.dark {
  --background: 233 29% 10%;
  --foreground: 220 22% 94%;
  --primary: 271 89% 70%;
  --secondary: 190 90% 62%;
  --muted: 230 21% 18%;
  --destructive: 0 76% 62%;
  --border: 228 18% 24%;
  --card: 232 27% 13%;

  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, hsla(var(--primary), 0.14), transparent 28%),
    radial-gradient(circle at top right, hsla(var(--secondary), 0.12), transparent 32%),
    hsl(var(--background));
}

button,
input,
select,
textarea {
  font: inherit;
}

.card-surface {
  background: linear-gradient(180deg, hsla(var(--card), 0.96), hsla(var(--card), 0.9));
  border: 1px solid hsla(var(--border), 0.9);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.glow-ring {
  position: relative;
}

.glow-ring::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, hsla(var(--primary), 0.45), hsla(var(--secondary), 0.28), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.soft-grid {
  background-image:
    linear-gradient(hsla(var(--border), 0.35) 1px, transparent 1px),
    linear-gradient(90deg, hsla(var(--border), 0.35) 1px, transparent 1px);
  background-size: 22px 22px;
}

.gradient-text {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.shimmer {
  background: linear-gradient(90deg, hsla(var(--muted), 0.65) 25%, hsla(var(--card), 1) 50%, hsla(var(--muted), 0.65) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

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

.float-up {
  animation: floatUp 0.55s var(--transition-smooth);
}

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

.dot-pulse {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.dot-pulse span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: hsl(var(--secondary));
  animation: pulseDot 1.2s infinite ease-in-out;
}

.dot-pulse span:nth-child(2) {
  animation-delay: 0.15s;
}

.dot-pulse span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pulseDot {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.45;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.route-shell {
  min-height: calc(100vh - 88px);
}

textarea:focus,
input:focus,
select:focus,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px hsla(var(--primary), 0.14);
}

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

::-webkit-scrollbar-thumb {
  background: hsla(var(--primary), 0.22);
  border-radius: 999px;
}

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