:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: 42 100% 96%;
  --foreground: 24 38% 14%;
  --card: 0 0% 100%;
  --card-foreground: 24 38% 14%;
  --popover: 0 0% 100%;
  --popover-foreground: 24 38% 14%;
  --primary: 335 84% 48%;
  --primary-foreground: 0 0% 100%;
  --secondary: 36 100% 88%;
  --secondary-foreground: 24 45% 18%;
  --muted: 36 52% 90%;
  --muted-foreground: 24 18% 39%;
  --accent: 142 62% 42%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 75% 48%;
  --destructive-foreground: 0 0% 100%;
  --success: 142 62% 42%;
  --success-foreground: 0 0% 100%;
  --warning: 36 95% 48%;
  --warning-foreground: 24 38% 14%;
  --info: 207 90% 45%;
  --info-foreground: 0 0% 100%;
  --border: 31 35% 82%;
  --input: 31 35% 82%;
  --ring: 335 84% 48%;
  --radius: 0.625rem;
  --shadow-sm: 0 1px 2px hsl(var(--foreground) / 0.05);
  --shadow-md: 0 4px 12px hsl(var(--foreground) / 0.08);
  --shadow-lg: 0 12px 32px hsl(var(--foreground) / 0.12);
  --shadow-elegant: 0 20px 48px hsl(var(--primary) / 0.22);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
  --background: 24 31% 9%;
  --foreground: 42 80% 94%;
  --card: 24 28% 13%;
  --card-foreground: 42 80% 94%;
  --popover: 24 28% 13%;
  --popover-foreground: 42 80% 94%;
  --primary: 335 84% 62%;
  --primary-foreground: 24 31% 9%;
  --secondary: 24 24% 20%;
  --secondary-foreground: 42 80% 94%;
  --muted: 24 20% 18%;
  --muted-foreground: 35 24% 72%;
  --accent: 142 58% 48%;
  --accent-foreground: 24 31% 9%;
  --destructive: 0 70% 58%;
  --destructive-foreground: 0 0% 100%;
  --success: 142 58% 48%;
  --success-foreground: 24 31% 9%;
  --warning: 39 96% 56%;
  --warning-foreground: 24 31% 9%;
  --info: 207 90% 62%;
  --info-foreground: 24 31% 9%;
  --border: 24 18% 26%;
  --input: 24 18% 26%;
  --ring: 335 84% 62%;
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, hsl(var(--primary) / 0.16), transparent 28rem),
    radial-gradient(circle at bottom right, hsl(var(--accent) / 0.14), transparent 28rem),
    hsl(var(--background));
  color: hsl(var(--foreground));
}

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

input, select, textarea {
  font-size: max(16px, 1rem);
}

.fruit-board-scroll {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--primary) / 0.45) transparent;
}

.fruit-cell {
  box-shadow: inset 0 -4px 0 hsl(var(--foreground) / 0.08), var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

.fruit-cell:active {
  transform: scale(0.96);
}

.fruit-pop {
  animation: fruitPop 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.float-score {
  animation: floatScore 900ms ease-out forwards;
}

@keyframes fruitPop {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes floatScore {
  0% { opacity: 0; transform: translateY(8px) scale(0.96); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-28px) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}