:root {
  --background: 220 33% 98%;
  --foreground: 222 30% 14%;
  --primary: 259 83% 58%;
  --secondary: 190 75% 42%;
  --muted: 220 18% 92%;
  --destructive: 0 78% 58%;
  --border: 220 16% 84%;
  --card: 0 0% 100%;
  --shadow-sm: 0 1px 2px hsla(222, 30%, 14%, 0.08);
  --shadow-md: 0 10px 25px hsla(222, 30%, 14%, 0.12);
  --shadow-lg: 0 20px 40px hsla(222, 30%, 14%, 0.18);
  --transition-fast: 160ms ease;
  --transition-smooth: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

.dark {
  --background: 228 24% 10%;
  --foreground: 220 20% 94%;
  --primary: 263 90% 68%;
  --secondary: 190 82% 58%;
  --muted: 226 18% 18%;
  --destructive: 0 84% 65%;
  --border: 226 14% 24%;
  --card: 228 22% 13%;
  --shadow-sm: 0 1px 2px hsla(0, 0%, 0%, 0.28);
  --shadow-md: 0 14px 30px hsla(0, 0%, 0%, 0.34);
  --shadow-lg: 0 24px 60px hsla(0, 0%, 0%, 0.42);
}

* {
  box-sizing: border-box;
}

html, body, #root {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, hsla(var(--primary), 0.16), transparent 26%),
    radial-gradient(circle at bottom left, hsla(var(--secondary), 0.10), transparent 22%),
    hsl(var(--background));
  color: hsl(var(--foreground));
}

.card-surface {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
}

.glass-surface {
  background: hsla(var(--card), 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid hsla(var(--border), 0.8);
  box-shadow: var(--shadow-md);
}

.focus-ring:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

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

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: hsla(var(--foreground), 0.14);
  border-radius: 999px;
}

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

.fade-in {
  animation: fadeIn 220ms ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

a {
  color: inherit;
  text-decoration: none;
}

@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
