@import "tailwindcss";

:root {
  --background: #ffffff;
  --foreground: #171717;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --secondary: #6366f1;
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-inter);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
    --primary: #f97316;
    --primary-dark: #ea580c;
    --secondary: #6366f1;
  }
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans), system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
}

html.smooth-scroll {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height, 80px);
  overscroll-behavior-y: contain; /* Prevents scroll chaining and improves touch scrolling */
}

/* Prevent content from getting stuck under fixed elements */
.smooth-scroll * {
  scroll-margin-top: var(--navbar-height, 80px);
}

/* Ensure proper scroll behavior for output section */
#output-section {
  position: relative;
  margin-top: 100px; /* Add spacing from form to output section */
  min-height: 500px; /* Ensure minimum height for output section */
}

/* Ensure navbar stays on top */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--navbar-bg, white);
}
