:root {
  --background: 225 20% 8%;
  --foreground: 220 20% 96%;
  --primary: 268 92% 67%;
  --secondary: 190 88% 54%;
  --muted: 224 14% 18%;
  --destructive: 0 78% 60%;
  --border: 222 15% 24%;
  --card: 226 18% 12%;
  --shadow-sm: 0 8px 20px hsla(268, 92%, 67%, 0.12);
  --shadow-md: 0 18px 40px hsla(225, 40%, 2%, 0.35);
  --shadow-lg: 0 30px 80px hsla(225, 45%, 2%, 0.5);
  --transition-fast: 160ms ease;
  --transition-smooth: 320ms cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

.dark {
  --background: 225 20% 8%;
  --foreground: 220 20% 96%;
  --primary: 268 92% 67%;
  --secondary: 190 88% 54%;
  --muted: 224 14% 18%;
  --destructive: 0 78% 60%;
  --border: 222 15% 24%;
  --card: 226 18% 12%;
}

* { box-sizing: border-box; }
html, body, #root { min-height: 100%; margin: 0; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, hsla(268, 92%, 67%, 0.18), transparent 30%),
    radial-gradient(circle at top right, hsla(190, 88%, 54%, 0.12), transparent 26%),
    hsl(var(--background));
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font: inherit;
}

button, a, input, select, textarea {
  transition: all var(--transition-fast);
}

.focus-ring:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid hsl(var(--secondary));
  outline-offset: 2px;
}

.card-glow {
  position: relative;
  overflow: hidden;
}
.card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, hsla(268, 92%, 67%, 0.28), hsla(190, 88%, 54%, 0.18), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.grid-bg {
  background-image:
    linear-gradient(hsla(0, 0%, 100%, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, hsla(0, 0%, 100%, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

.timeline-scroll::-webkit-scrollbar,
.thin-scroll::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
.timeline-scroll::-webkit-scrollbar-thumb,
.thin-scroll::-webkit-scrollbar-thumb {
  background: hsl(var(--muted));
  border-radius: 999px;
}
.timeline-scroll::-webkit-scrollbar-track,
.thin-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.video-safe {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, hsla(268, 92%, 67%, 0.12), hsla(190, 88%, 54%, 0.08));
}

.badge-gradient {
  background: linear-gradient(135deg, hsla(268, 92%, 67%, 0.22), hsla(190, 88%, 54%, 0.2));
}

.range {
  accent-color: hsl(var(--secondary));
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid hsla(0, 0%, 100%, 0.18);
  border-top-color: hsl(var(--secondary));
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; }
}