:root {
  --background: 248 34% 7%;
  --foreground: 218 28% 96%;
  --primary: 164 100% 55%;
  --secondary: 280 95% 66%;
  --muted: 230 12% 66%;
  --destructive: 356 88% 66%;
  --border: 238 22% 22%;
  --card: 246 30% 12%;
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 18px 52px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.42);
  --transition-fast: 160ms ease;
  --transition-smooth: 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius-sm: 0.85rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.65rem;
}

.dark {
  --background: 248 34% 7%;
  --foreground: 218 28% 96%;
  --primary: 164 100% 55%;
  --secondary: 280 95% 66%;
  --muted: 230 12% 66%;
  --destructive: 356 88% 66%;
  --border: 238 22% 22%;
  --card: 246 30% 12%;
}

* {
  box-sizing: border-box;
}

html {
  background: hsl(var(--background));
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, hsl(var(--primary) / 0.14), transparent 36rem),
    radial-gradient(circle at 20% 90%, hsl(var(--secondary) / 0.12), transparent 30rem),
    hsl(var(--background));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.media-card {
  transform: translateZ(0);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.media-card:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--primary) / 0.35);
}

.media-added {
  animation: mediaPop 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mediaPop {
  0% {
    opacity: 0.4;
    transform: scale(0.94) translateY(18px);
    filter: blur(8px);
  }
  55% {
    opacity: 1;
    transform: scale(1.025) translateY(-4px);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

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

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

::-webkit-scrollbar-track {
  background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 999px;
}

::selection {
  background: hsl(var(--primary) / 0.28);
  color: hsl(var(--foreground));
}