:root {
  --background: 210 33% 98%;
  --foreground: 222 28% 14%;
  --primary: 221 83% 58%;
  --secondary: 174 72% 40%;
  --muted: 210 24% 93%;
  --destructive: 0 84% 60%;
  --border: 214 20% 86%;
  --card: 0 0% 100%;
  --success: 142 72% 42%;
  --warning: 32 95% 56%;
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 24px 70px rgba(37, 99, 235, 0.22);
  --transition-fast: 120ms ease;
  --transition-smooth: 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

.dark {
  --background: 222 32% 8%;
  --foreground: 210 40% 96%;
  --primary: 217 91% 64%;
  --secondary: 174 74% 46%;
  --muted: 222 23% 15%;
  --destructive: 0 76% 58%;
  --border: 221 18% 21%;
  --card: 222 24% 11%;
  --success: 142 70% 48%;
  --warning: 36 96% 60%;
  --shadow-sm: 0 12px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 20px 48px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 28px 88px rgba(37, 99, 235, 0.24);
}

* {
  box-sizing: border-box;
}

html, body, #root {
  margin: 0;
  min-height: 100%;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background-image:
    radial-gradient(circle at top left, hsla(217, 91%, 64%, 0.14), transparent 30%),
    radial-gradient(circle at top right, hsla(174, 74%, 46%, 0.12), transparent 24%),
    radial-gradient(circle at bottom center, hsla(32, 95%, 56%, 0.08), transparent 26%),
    linear-gradient(180deg, hsla(220, 28%, 50%, 0.03), transparent 22%);
}

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

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

button {
  transition: transform var(--transition-fast), opacity var(--transition-fast), background var(--transition-smooth), border-color var(--transition-fast);
}

button:active {
  transform: scale(0.98);
}

input, select, textarea {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 4px hsla(217, 91%, 64%, 0.16);
}

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

::-webkit-scrollbar-thumb {
  background: hsla(215, 16%, 60%, 0.28);
  border-radius: 999px;
}

.glass {
  background: linear-gradient(180deg, hsla(217, 91%, 64%, 0.08), hsla(0, 0%, 100%, 0.02));
  backdrop-filter: blur(14px);
}

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

.card-sheen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, hsla(217, 91%, 64%, 0.09) 45%, transparent 65%);
  transform: translateX(-100%);
  transition: transform 700ms ease;
}

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

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

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

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

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.mobile-safe {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.no-scrollbar {
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}