:root {
  --background: 222 34% 97%;
  --foreground: 230 24% 13%;
  --primary: 264 83% 62%;
  --secondary: 186 79% 46%;
  --accent: 327 82% 61%;
  --muted: 222 22% 92%;
  --destructive: 0 75% 56%;
  --border: 225 22% 84%;
  --card: 0 0% 100%;

  --shadow-sm: 0 10px 30px -18px hsla(240, 50%, 20%, 0.18);
  --shadow-md: 0 18px 45px -22px hsla(245, 58%, 18%, 0.24);
  --shadow-lg: 0 28px 80px -28px hsla(250, 60%, 16%, 0.34);

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

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

.dark {
  --background: 232 33% 8%;
  --foreground: 220 25% 94%;
  --primary: 268 90% 70%;
  --secondary: 186 82% 60%;
  --accent: 327 88% 69%;
  --muted: 228 20% 15%;
  --destructive: 0 78% 63%;
  --border: 227 16% 22%;
  --card: 228 23% 11%;

  --shadow-sm: 0 12px 32px -20px hsla(0, 0%, 0%, 0.48);
  --shadow-md: 0 24px 60px -28px hsla(0, 0%, 0%, 0.58);
  --shadow-lg: 0 36px 90px -36px hsla(0, 0%, 0%, 0.7);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

::selection {
  background: hsl(var(--primary) / 0.24);
  color: hsl(var(--foreground));
}

#root {
  min-height: 100vh;
}

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

@keyframes pulseShimmer {
  0% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.55;
  }
}

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

.animate-enter {
  animation: floatUp 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.skeleton {
  background: linear-gradient(90deg, hsl(var(--muted)) 0%, hsl(var(--border) / 0.55) 50%, hsl(var(--muted)) 100%);
  background-size: 200% 100%;
  animation: pulseShimmer 1.6s ease-in-out infinite;
}

.glass {
  background: hsl(var(--card) / 0.72);
  backdrop-filter: blur(16px);
}

.spin {
  animation: spinAround 0.9s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
