/* ==========================================================================
   Design tokens — lifted 1:1 from tools.ankitjha.com.np
   ========================================================================== */

:root {
  --font-geist-sans: 'Geist', 'Geist Fallback', ui-sans-serif, system-ui,
    -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-geist-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --lightningcss-light: initial;
  --lightningcss-dark: ;
  color-scheme: light;

  --background: #ecf3fa;
  --foreground: #09121c;

  --card: #ffffff9e;
  --card-foreground: #09121c;
  --popover: #ffffffc7;
  --popover-foreground: #09121c;

  --primary: #0072a3;
  --primary-foreground: #fff;

  --secondary: #dce6f0bd;
  --secondary-foreground: #121c26;

  --muted: #dce6f09e;
  --muted-foreground: #434e5b;

  --accent: #bfdcefb8;
  --accent-foreground: #09121c;

  --destructive: #d73337;

  --border: #ffffffb8;
  --input: #65738329;
  --ring: #0072a3;

  --chart-1: #0091cb;
  --chart-2: #00b4bb;
  --chart-3: #5c80bc;
  --chart-4: #57c791;
  --chart-5: #c19900;

  --radius: 1rem;

  --sidebar: #111417;
  --sidebar-foreground: #e5e8eb;
  --sidebar-primary: #0091cb;
  --sidebar-primary-foreground: #fcfcfc;
  --sidebar-accent: #212428;
  --sidebar-accent-foreground: #e5e8eb;
  --sidebar-border: #ffffff17;
  --sidebar-ring: #0091cb;

  /* Tool-category accents (iLovePDF-style) */
  --cat-organize: #ee6c4d;
  --cat-optimize: #8fbc5d;
  --cat-convert: #5f83c6;
  --cat-edit: #ab6993;
  --cat-security: #d04526;
  --cat-intelligence: #00b4bb;

  --shadow-sm: 0 1px 2px rgb(9 18 28 / 0.06);
  --shadow-md: 0 4px 20px -6px rgb(9 18 28 / 0.14);
  --shadow-lg: 0 18px 50px -18px rgb(9 18 28 / 0.28);
}

.dark {
  --lightningcss-light: ;
  --lightningcss-dark: initial;
  color-scheme: dark;

  --background: #0f1822;
  --foreground: #e9eff6;

  --card: #1d2a37c4;
  --card-foreground: #e9eff6;
  --popover: #1e2c3aeb;
  --popover-foreground: #e9eff6;

  --primary: #35b6f2;
  --primary-foreground: #04121c;

  --secondary: #263443cc;
  --secondary-foreground: #e9eff6;

  --muted: #1e2b38d9;
  --muted-foreground: #a9b5c2;

  --accent: #1e3d51d9;
  --accent-foreground: #e9eff6;

  --destructive: #ff6b6e;

  --border: #ffffff24;
  --input: #ffffff2b;
  --ring: #35b6f2;

  --chart-1: #d4d4d4;
  --chart-2: #737373;
  --chart-3: #525252;
  --chart-4: #404040;
  --chart-5: #262626;

  --sidebar: #171717;
  --sidebar-foreground: #fafafa;
  --sidebar-primary: #1447e6;
  --sidebar-primary-foreground: #fafafa;
  --sidebar-accent: #262626;
  --sidebar-accent-foreground: #fafafa;
  --sidebar-border: #ffffff1a;
  --sidebar-ring: #737373;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow-md: 0 4px 22px -6px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 20px 54px -18px rgb(0 0 0 / 0.65);
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

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

body {
  margin: 0;
  background-color: var(--background);
  min-height: 100vh;
  color: var(--foreground);
  font-family: var(--font-geist-sans), ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* A soft, layered light field instead of one flat blob: a warm primary
     haze from the top centre and a cool teal bloom in the top-right corner.
     Both are mixed down so text keeps full contrast in light and dark. */
  background-image: radial-gradient(
      58rem 32rem at 50% -14%,
      color-mix(in oklab, var(--primary) 22%, transparent),
      transparent 72%
    ),
    radial-gradient(
      40rem 26rem at 96% 2%,
      color-mix(in oklab, #00b4bb 15%, transparent),
      transparent 70%
    ),
    linear-gradient(135deg, var(--card), transparent 44%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Slim, theme-aware scrollbar — visible on Windows without shouting. */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklab, var(--foreground) 22%, transparent)
    transparent;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in oklab, var(--foreground) 20%, transparent);
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: color-mix(in oklab, var(--foreground) 34%, transparent);
  background-clip: content-box;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

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

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

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

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