:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: 232 48% 6%;
  --foreground: 220 35% 96%;
  --card: 234 38% 13%;
  --card-foreground: 220 35% 96%;
  --popover: 236 42% 11%;
  --popover-foreground: 220 35% 96%;
  --primary: 192 100% 52%;
  --primary-foreground: 228 48% 7%;
  --secondary: 267 92% 68%;
  --secondary-foreground: 228 48% 7%;
  --muted: 232 28% 18%;
  --muted-foreground: 225 18% 72%;
  --accent: 152 84% 50%;
  --accent-foreground: 228 48% 7%;
  --destructive: 0 84% 62%;
  --destructive-foreground: 220 35% 96%;
  --success: 152 75% 44%;
  --success-foreground: 228 48% 7%;
  --warning: 42 96% 58%;
  --warning-foreground: 228 48% 7%;
  --info: 212 100% 62%;
  --info-foreground: 228 48% 7%;
  --border: 225 24% 24%;
  --input: 225 24% 24%;
  --ring: 192 100% 52%;
  --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 24px 80px hsl(var(--primary) / 0.22), 0 8px 32px hsl(var(--secondary) / 0.16);
  --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);
  --launcher-blur: 24px;
  --launcher-alpha: 0.58;
  --motion-depth: 1;
}

.dark {
  --background: 232 48% 6%;
  --foreground: 220 35% 96%;
  --card: 234 38% 13%;
  --card-foreground: 220 35% 96%;
  --popover: 236 42% 11%;
  --popover-foreground: 220 35% 96%;
  --muted: 232 28% 18%;
  --muted-foreground: 225 18% 72%;
  --border: 225 24% 24%;
  --input: 225 24% 24%;
}

html, body, #root { min-height: 100%; }
html { background: hsl(var(--background)); scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: hsl(var(--foreground));
  background: radial-gradient(circle at 15% 15%, hsl(var(--primary) / 0.24), transparent 30%), radial-gradient(circle at 85% 10%, hsl(var(--secondary) / 0.22), transparent 34%), radial-gradient(circle at 75% 80%, hsl(var(--accent) / 0.16), transparent 28%), hsl(var(--background));
  overflow-x: hidden;
}

* { box-sizing: border-box; }
button, input, select { font: inherit; }
input, select { font-size: max(16px, 1rem); }

.liquid-scene::before,
.liquid-scene::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 20rem;
  height: 20rem;
  border-radius: 9999px;
  pointer-events: none;
  filter: blur(56px);
  opacity: 0.62;
  z-index: -1;
  transform: translate3d(0, 0, 0);
}
.liquid-scene::before {
  left: -6rem;
  top: 8rem;
  background: hsl(var(--primary) / 0.26);
  animation: float-a 9s ease-in-out infinite;
}
.liquid-scene::after {
  right: -5rem;
  bottom: 7rem;
  background: hsl(var(--secondary) / 0.24);
  animation: float-b 11s ease-in-out infinite;
}

.glass {
  background: linear-gradient(135deg, hsl(var(--card) / var(--launcher-alpha)), hsl(var(--popover) / 0.36));
  border: 1px solid hsl(var(--border) / 0.82);
  box-shadow: var(--shadow-sm), inset 0 1px 0 hsl(var(--foreground) / 0.10);
  backdrop-filter: blur(var(--launcher-blur)) saturate(1.35);
  -webkit-backdrop-filter: blur(var(--launcher-blur)) saturate(1.35);
}

.glass-strong {
  background: linear-gradient(135deg, hsl(var(--popover) / 0.78), hsl(var(--card) / 0.54));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-lg), inset 0 1px 0 hsl(var(--foreground) / 0.12);
  backdrop-filter: blur(calc(var(--launcher-blur) + 8px)) saturate(1.45);
  -webkit-backdrop-filter: blur(calc(var(--launcher-blur) + 8px)) saturate(1.45);
}

.dynamic-island {
  background: linear-gradient(135deg, hsl(var(--foreground) / 0.12), hsl(var(--foreground) / 0.04));
  border: 1px solid hsl(var(--foreground) / 0.14);
  box-shadow: inset 0 1px 0 hsl(var(--foreground) / 0.18), 0 12px 48px hsl(var(--primary) / 0.12);
}

.safe-page { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
.safe-top { padding-top: env(safe-area-inset-top); }

.icon-float { animation: icon-float 4s ease-in-out infinite; }
.bokeh-dot { box-shadow: 0 0 48px hsl(var(--primary) / 0.28); }

@keyframes float-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(3rem, 2rem, 0) scale(1.08); }
}
@keyframes float-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-2rem, -3rem, 0) scale(1.12); }
}
@keyframes icon-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(calc(-4px * var(--motion-depth))) rotate(1deg); }
}
@keyframes enter-up {
  from { opacity: 0; transform: translateY(16px) scale(0.98); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.animate-enter-up { animation: enter-up var(--transition-smooth) both; }

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