:root {
  --background: 220 35% 97%;
  --foreground: 222 28% 14%;
  --primary: 258 84% 58%;
  --secondary: 190 72% 46%;
  --muted: 220 24% 92%;
  --destructive: 3 78% 56%;
  --border: 221 20% 84%;
  --card: 0 0% 100%;
  --shadow-sm: 0 8px 24px rgba(44, 52, 80, 0.08);
  --shadow-md: 0 20px 40px rgba(51, 37, 89, 0.14);
  --shadow-lg: 0 28px 80px rgba(73, 45, 153, 0.22);
  --transition-fast: 120ms ease;
  --transition-smooth: 220ms ease;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
}

.dark {
  --background: 227 33% 10%;
  --foreground: 220 20% 94%;
  --primary: 263 90% 69%;
  --secondary: 189 76% 56%;
  --muted: 225 22% 18%;
  --destructive: 4 80% 62%;
  --border: 224 18% 24%;
  --card: 225 28% 14%;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 20px 40px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  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.14), transparent 32%),
    radial-gradient(circle at top left, hsla(var(--secondary), 0.12), transparent 26%),
    hsl(var(--background));
}

button, input, select {
  font: inherit;
}

.card-sheen {
  position: relative;
  overflow: hidden;
}

.card-sheen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, hsla(0, 0%, 100%, 0.14) 35%, transparent 70%);
  transform: translateX(-120%);
  transition: transform var(--transition-smooth);
  pointer-events: none;
}

.card-sheen:hover::after {
  transform: translateX(120%);
}

.grid-fade {
  background-image:
    linear-gradient(hsla(var(--border), 0.3) 1px, transparent 1px),
    linear-gradient(90deg, hsla(var(--border), 0.3) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: center;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 8px;
}

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

.glass {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.pulse-dot {
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: hsla(var(--muted), 0.9);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, hsla(0, 0%, 100%, 0.28), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
