:root {
  --background: 196 100% 97%;
  --foreground: 230 32% 20%;
  --primary: 328 88% 60%;
  --secondary: 48 96% 72%;
  --muted: 190 42% 92%;
  --destructive: 8 86% 58%;
  --border: 201 34% 82%;
  --card: 0 0% 100%;

  --shadow-sm: 0 8px 20px hsl(230 40% 20% / 0.08);
  --shadow-md: 0 14px 36px hsl(230 40% 20% / 0.12);
  --shadow-lg: 0 18px 50px hsl(328 88% 30% / 0.22);

  --transition-fast: 120ms ease-out;
  --transition-smooth: 220ms cubic-bezier(0.22, 1, 0.36, 1);

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

.dark {
  --background: 228 30% 10%;
  --foreground: 196 70% 96%;
  --primary: 328 82% 66%;
  --secondary: 48 92% 68%;
  --muted: 228 24% 18%;
  --destructive: 8 84% 62%;
  --border: 228 18% 26%;
  --card: 228 24% 14%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.game-stage {
  touch-action: manipulation;
}

.floaty {
  animation: drift 4s ease-in-out infinite;
}

.floaty-delayed {
  animation: drift 5.5s ease-in-out infinite 0.8s;
}

.star-spin {
  animation: twinkle 1.2s linear infinite;
}

@keyframes drift {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(8px) translateX(-4px);
  }
}

@keyframes twinkle {
  0% {
    transform: rotate(0deg) scale(0.92);
    filter: drop-shadow(0 0 0 hsl(var(--secondary) / 0.1));
  }
  50% {
    transform: rotate(180deg) scale(1.08);
    filter: drop-shadow(0 0 10px hsl(var(--secondary) / 0.8));
  }
  100% {
    transform: rotate(360deg) scale(0.92);
    filter: drop-shadow(0 0 0 hsl(var(--secondary) / 0.1));
  }
}

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

::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 999px;
}

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