/* ==========================================================================
   StreamDL — shadcn/ui Official Dark Theme (Zinc + White)
   ========================================================================== */

:root {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;

  --card: 240 10% 3.9%;
  --card-foreground: 0 0% 98%;

  --popover: 240 10% 3.9%;
  --popover-foreground: 0 0% 98%;

  /* Pure White primary (Official shadcn/ui Neutral Dark theme) */
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;

  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;

  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;

  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;

  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;

  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;

  --radius: 0.5rem;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Container transition for smooth centering-to-results glide */
#mainContainer {
  min-height: 100vh;
  min-height: 100dvh;
  transition: padding-top 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              padding-bottom 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

#mainContainer.is-initial {
  padding-top: calc(50dvh - 2.5rem);
  padding-bottom: 2rem;
}

@media (min-width: 640px) {
  #mainContainer.is-initial {
    padding-top: calc(50dvh - 3.25rem);
    padding-bottom: 2rem;
  }
}

#mainContainer.has-results {
  padding-top: 2.5rem;
  padding-bottom: 8rem;
}

/* Card entrance animation with gentle lift and opacity fade */
.card-entrance {
  animation: smoothCardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

@keyframes smoothCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.995);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animations */
@keyframes enter {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-enter {
  animation: enter 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom scrollbar matching shadcn */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: var(--radius);
}
::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground));
}

/* Range input styled for shadcn */
input[type="range"] {
  accent-color: hsl(var(--primary));
}

/* Select element overflow protection */
select {
  max-width: 100%;
  text-overflow: ellipsis;
}
