/**
 * Design System Tokens
 * Based on shuriii directory
 */

:root {
  /* Colors */
  --color-background: #FFFFFF;
  --color-background-alt: #FAFAFA;
  --color-foreground: #0A0A0A;
  --color-foreground-muted: #737373;
  --color-border: #E5E5E5;
  --color-border-light: #F5F5F5;

  /* Primary Actions */
  --color-primary: #0A0A0A;
  --color-primary-foreground: #FFFFFF;
  --color-primary-hover: #262626;

  /* Accent Colors */
  --color-accent-blue: #3B82F6;
  --color-accent-blue-light: #DBEAFE;
  --color-accent-green: #10B981;
  --color-accent-green-light: #D1FAE5;
  --color-accent-yellow: #D97706;
  --color-accent-yellow-light: #FEF3C7;
  --color-accent-gray: #6B7280;
  --color-accent-gray-light: #F3F4F6;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Courier New", monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* Spacing */
  --spacing-1: 0.25rem;    /* 4px */
  --spacing-2: 0.5rem;     /* 8px */
  --spacing-3: 0.75rem;    /* 12px */
  --spacing-4: 1rem;       /* 16px */
  --spacing-5: 1.25rem;    /* 20px */
  --spacing-6: 1.5rem;     /* 24px */
  --spacing-8: 2rem;       /* 32px */
  --spacing-10: 2.5rem;    /* 40px */
  --spacing-12: 3rem;      /* 48px */
  --spacing-16: 4rem;      /* 64px */

  /* Border Radius */
  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.375rem;   /* 6px */
  --radius-lg: 0.5rem;     /* 8px */
  --radius-xl: 0.75rem;    /* 12px */
  --radius-2xl: 1rem;      /* 16px */
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;

  /* Layout */
  --sidebar-width: 288px;
  --sidebar-width-collapsed: 72px;
  --max-content-width: 80rem; /* 1280px */

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-fixed: 30;
  --z-modal: 40;
  --z-popover: 50;

  /* UI Kit specific variables (from the design) */
  --background: #FFFFFF;
  --surface-sunken: #F5F5F5;
  --text-primary: #0A0A0A;
  --text-secondary: #737373;
  --text-muted: #A3A3A3;
  --border: #E5E5E5;
  --border-input: #D4D4D4;
  --primary: #0A0A0A;
  --accent: #3B82F6;
  --focus-ring: rgba(59, 130, 246, 0.5);
  --color-gray-200: #E5E5E5;

  /* Badge colors */
  --badge-category-bg: #F5F5F5;
  --badge-category-text: #737373;
  --badge-success-bg: var(--color-accent-green-light);
  --badge-success-text: var(--color-accent-green);
  --badge-grade-bg: var(--color-accent-blue-light);
  --badge-grade-text: var(--color-accent-blue);
  --badge-warning-bg: var(--color-accent-yellow-light);
  --badge-warning-text: var(--color-accent-yellow);
  --badge-error-bg: #FEE2E2;
  --badge-error-text: #DC2626;
  --badge-purple-bg: #F3E8FF;
  --badge-purple-text: #6B21A8;
  --badge-teal-bg: #CCFBF1;
  --badge-teal-text: #115E59;
  --badge-cyan-bg: #CFFAFE;
  --badge-cyan-text: #0E7490;

  /* Interactive states - light mode */
  --hover-overlay: rgba(0, 0, 0, 0.03);
  --hover-overlay-strong: rgba(0, 0, 0, 0.05);
  --hover-overlay-medium: rgba(0, 0, 0, 0.08);
  --mobile-overlay: rgba(10, 10, 10, 0.35);
}

/* Dark mode - OS preference */
@media (prefers-color-scheme: dark) {
  :root:not(.light-mode) {
    --color-background: #0A0A0A;
    --color-background-alt: #171717;
    --color-foreground: #FAFAFA;
    --color-foreground-muted: #A3A3A3;
    --color-border: #262626;
    --color-border-light: #1F1F1F;
    --color-primary: #FAFAFA;
    --color-primary-foreground: #0A0A0A;
    --color-primary-hover: #E5E5E5;

    --background: #0A0A0A;
    --surface-sunken: #171717;
    --text-primary: #FAFAFA;
    --text-secondary: #A3A3A3;
    --text-muted: #737373;
    --border: #262626;
    --border-input: #404040;
    --primary: #FAFAFA;

    /* Accent colors remain the same in dark mode for visibility */
    --color-accent-yellow-light: #422006;
    --color-accent-gray-light: #1F1F1F;

    /* Badge colors for dark mode */
    --badge-category-bg: #262626;
    --badge-category-text: #A3A3A3;
    --badge-success-bg: #052E16;
    --badge-success-text: #86EFAC;
    --badge-grade-bg: #172554;
    --badge-grade-text: #93C5FD;
    --badge-warning-bg: #422006;
    --badge-warning-text: #FCD34D;
    --badge-error-bg: #450A0A;
    --badge-error-text: #FCA5A5;
    --badge-purple-bg: #3B0764;
    --badge-purple-text: #E9D5FF;
    --badge-teal-bg: #134E4A;
    --badge-teal-text: #99F6E4;
    --badge-cyan-bg: #164E63;
    --badge-cyan-text: #A5F3FC;

    /* Interactive states - dark mode */
    --hover-overlay: rgba(255, 255, 255, 0.03);
    --hover-overlay-strong: rgba(255, 255, 255, 0.05);
    --hover-overlay-medium: rgba(255, 255, 255, 0.08);
    --mobile-overlay: rgba(0, 0, 0, 0.6);
  }
}

/* Dark mode - user toggle */
:root.dark-mode {
  --color-background: #0A0A0A;
  --color-background-alt: #171717;
  --color-foreground: #FAFAFA;
  --color-foreground-muted: #A3A3A3;
  --color-border: #262626;
  --color-border-light: #1F1F1F;
  --color-primary: #FAFAFA;
  --color-primary-foreground: #0A0A0A;
  --color-primary-hover: #E5E5E5;

  --background: #0A0A0A;
  --surface-sunken: #171717;
  --text-primary: #FAFAFA;
  --text-secondary: #A3A3A3;
  --text-muted: #737373;
  --border: #262626;
  --border-input: #404040;
  --primary: #FAFAFA;

  /* Accent colors remain the same in dark mode for visibility */
  --color-accent-yellow-light: #422006;
  --color-accent-gray-light: #1F1F1F;

  /* Badge colors for dark mode */
  --badge-category-bg: #262626;
  --badge-category-text: #A3A3A3;
  --badge-success-bg: #052E16;
  --badge-success-text: #86EFAC;
  --badge-grade-bg: #172554;
  --badge-grade-text: #93C5FD;
  --badge-warning-bg: #422006;
  --badge-warning-text: #FCD34D;
  --badge-error-bg: #450A0A;
  --badge-error-text: #FCA5A5;
  --badge-purple-bg: #3B0764;
  --badge-purple-text: #E9D5FF;
  --badge-teal-bg: #134E4A;
  --badge-teal-text: #99F6E4;
  --badge-cyan-bg: #164E63;
  --badge-cyan-text: #A5F3FC;

  /* Interactive states - dark mode */
  --hover-overlay: rgba(255, 255, 255, 0.03);
  --hover-overlay-strong: rgba(255, 255, 255, 0.05);
  --hover-overlay-medium: rgba(255, 255, 255, 0.08);
  --mobile-overlay: rgba(0, 0, 0, 0.6);
}
