:root {
  --background: 220 45% 98%;
  --foreground: 230 32% 9%;
  --primary: 263 92% 58%;
  --primary-foreground: 0 0% 100%;
  --secondary: 188 92% 42%;
  --secondary-foreground: 222 47% 8%;
  --muted: 226 28% 91%;
  --muted-foreground: 226 14% 42%;
  --destructive: 0 84% 58%;
  --destructive-foreground: 0 0% 100%;
  --border: 226 28% 84%;
  --card: 0 0% 100%;
  --shadow-sm: 0 10px 30px hsl(230 45% 20% / 0.08);
  --shadow-md: 0 20px 55px hsl(263 92% 45% / 0.18);
  --shadow-lg: 0 30px 90px hsl(230 70% 15% / 0.22);
  --transition-fast: 160ms ease;
  --transition-smooth: 320ms cubic-bezier(.2,.8,.2,1);
  --radius-sm: 0.75rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.75rem;
}

.dark {
  --background: 231 42% 7%;
  --foreground: 220 45% 96%;
  --primary: 270 100% 68%;
  --primary-foreground: 231 42% 7%;
  --secondary: 184 100% 48%;
  --secondary-foreground: 231 42% 7%;
  --muted: 232 30% 15%;
  --muted-foreground: 226 18% 72%;
  --destructive: 0 90% 65%;
  --destructive-foreground: 0 0% 100%;
  --border: 232 28% 22%;
  --card: 232 36% 11%;
  --shadow-sm: 0 10px 30px hsl(0 0% 0% / 0.22);
  --shadow-md: 0 20px 60px hsl(270 100% 50% / 0.26);
  --shadow-lg: 0 35px 110px hsl(184 100% 50% / 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}

button, a, input {
  transition: all var(--transition-smooth);
}

.cosmic-bg {
  background:
    radial-gradient(circle at 15% 10%, hsl(var(--primary) / 0.24), transparent 28rem),
    radial-gradient(circle at 82% 18%, hsl(var(--secondary) / 0.20), transparent 25rem),
    radial-gradient(circle at 50% 88%, hsl(var(--primary) / 0.12), transparent 28rem);
}

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

.hero-orb {
  position: relative;
  animation: floatOrb 5s ease-in-out infinite;
}

.hero-orb::before,
.hero-orb::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.35);
  animation: pulseRing 2.8s ease-in-out infinite;
}

.hero-orb::after {
  inset: -38px;
  border-color: hsl(var(--secondary) / 0.24);
  animation-delay: 0.8s;
}

.creature-card::before {
  content: "";
  position: absolute;
  left: -30%;
  top: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, hsl(var(--foreground) / 0.08), transparent);
  transform: skewX(-18deg) translateX(-100%);
  transition: transform 700ms ease;
}

.creature-card:hover::before {
  transform: skewX(-18deg) translateX(380%);
}

@keyframes floatOrb {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}

@keyframes pulseRing {
  0%, 100% { opacity: 0.65; transform: scale(0.98); }
  50% { opacity: 0.2; transform: scale(1.04); }
}

::selection {
  background: hsl(var(--primary) / 0.35);
}
