/**
 * YugoVIN Design System - Auto.dev Inspired Dark Theme
 *
 * Central design tokens for consistent theming across all pages.
 * Dark mode by default with Tech Blue accent color.
 */

:root {
  /* ========================================================================
     COLORS - Auto.dev Dark Theme
     ======================================================================== */

  /* Background Colors */
  --bg-primary: #0f0f0f;          /* Main background */
  --bg-secondary: #1a1a1a;        /* Cards, panels */
  --bg-tertiary: #242424;         /* Hover states, elevated */
  --bg-elevated: #2a2a2a;         /* Modals, dropdowns */
  --bg-input: #1a1a1a;            /* Form inputs */

  /* Brand Colors - Tech Blue */
  --color-primary: #3B82F6;       /* Tech Blue */
  --color-primary-dark: #2563EB;
  --color-primary-light: #60A5FA;
  --color-primary-alpha: rgba(59, 130, 246, 0.1);
  --color-secondary: #8B5CF6;     /* Purple accent */
  --color-secondary-dark: #7C3AED;
  --color-secondary-light: #A78BFA;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --gradient-primary-hover: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  --gradient-blue-purple: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);
  --gradient-dark: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  --gradient-glow: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  --gradient-subtle: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);

  /* UI Colors */
  --color-success: #10B981;
  --color-success-light: rgba(16, 185, 129, 0.1);
  --color-warning: #F59E0B;
  --color-warning-light: rgba(245, 158, 11, 0.1);
  --color-danger: #EF4444;
  --color-danger-light: rgba(239, 68, 68, 0.1);
  --color-info: #06B6D4;
  --color-info-light: rgba(6, 182, 212, 0.1);

  /* Text Colors */
  --color-text: #ffffff;
  --color-text-light: #a0a0a0;
  --color-text-lighter: #6b6b6b;
  --color-text-inverse: #0f0f0f;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-tertiary: #6b6b6b;
  --text-muted: #525252;

  /* Background Colors (Legacy Support) */
  --color-bg: #0f0f0f;
  --color-bg-alt: #1a1a1a;
  --color-bg-light: #242424;
  --color-bg-dark: #0f0f0f;
  --color-bg-darker: #0a0a0a;

  /* Border Colors */
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-light: rgba(255, 255, 255, 0.05);
  --color-border-dark: rgba(255, 255, 255, 0.15);
  --border-primary: rgba(255, 255, 255, 0.1);
  --border-secondary: rgba(255, 255, 255, 0.05);
  --border-highlight: rgba(59, 130, 246, 0.5);
  --border-gradient: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(139, 92, 246, 0.5));

  /* ========================================================================
     TYPOGRAPHY
     ======================================================================== */

  /* Font Families */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;

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

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

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

  /* Letter Spacing */
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;

  /* ========================================================================
     SPACING
     ======================================================================== */

  --spacing-0: 0;
  --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 */
  --spacing-20: 5rem;     /* 80px */
  --spacing-24: 6rem;     /* 96px */

  /* ========================================================================
     LAYOUT
     ======================================================================== */

  /* Container Widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1400px;

  /* Breakpoints */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* Z-index Layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* ========================================================================
     BORDERS & RADIUS
     ======================================================================== */

  /* Border Widths */
  --border-width: 1px;
  --border-width-2: 2px;
  --border-width-4: 4px;

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

  /* ========================================================================
     SHADOWS & EFFECTS
     ======================================================================== */

  /* Dark theme shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);

  /* Glow effects */
  --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
  --glow-blue-strong: 0 0 40px rgba(59, 130, 246, 0.5);
  --glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
  --glow-success: 0 0 20px rgba(16, 185, 129, 0.3);

  /* Focus Shadow */
  --shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.4);

  /* ========================================================================
     TRANSITIONS & ANIMATIONS
     ======================================================================== */

  /* Transition Durations */
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;

  /* Easing Functions */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Common Transitions */
  --transition-base: all var(--duration-base) var(--ease-in-out);
  --transition-fast: all var(--duration-fast) var(--ease-in-out);
  --transition-slow: all var(--duration-slow) var(--ease-in-out);
  --transition-colors: color var(--duration-fast) var(--ease-in-out),
                       background-color var(--duration-fast) var(--ease-in-out),
                       border-color var(--duration-fast) var(--ease-in-out);

  /* ========================================================================
     COMPONENT-SPECIFIC
     ======================================================================== */

  /* Header */
  --header-height: 72px;
  --header-height-mobile: 64px;
  --header-bg: rgba(15, 15, 15, 0.8);

  /* Sidebar */
  --sidebar-width: 280px;
  --sidebar-width-collapsed: 72px;
  --sidebar-bg: var(--bg-secondary);

  /* Footer */
  --footer-bg: var(--bg-secondary);

  /* Card */
  --card-bg: var(--bg-secondary);
  --card-padding: var(--spacing-6);
  --card-radius: var(--radius-xl);
  --card-border: var(--border-primary);
  --card-shadow: var(--shadow-lg);

  /* Button */
  --button-padding-sm: var(--spacing-2) var(--spacing-4);
  --button-padding-md: var(--spacing-3) var(--spacing-6);
  --button-padding-lg: var(--spacing-4) var(--spacing-8);
  --button-radius: var(--radius-lg);

  /* Input */
  --input-height-sm: 36px;
  --input-height-md: 44px;
  --input-height-lg: 52px;
  --input-bg: var(--bg-input);
  --input-border: var(--border-primary);
  --input-border-color: var(--border-primary);
  --input-radius: var(--radius-lg);
  --input-focus-border: var(--color-primary);
  --input-focus-border-color: var(--color-primary);

  /* Code Block */
  --code-bg: #0d0d0d;
  --code-border: var(--border-primary);
  --code-color: #e4e4e7;
  --code-padding: var(--spacing-4);
  --code-radius: var(--radius-lg);

  /* Badge */
  --badge-radius: var(--radius-full);
  --badge-padding: var(--spacing-1) var(--spacing-3);
}

/* ========================================================================
   BASE STYLES
   ======================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--bg-primary);
}

/* ========================================================================
   UTILITY CLASSES
   ======================================================================== */

/* Text Gradient */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Logo Gradient */
.logo-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Gradient Border Effect */
.gradient-border {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--border-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Glow Effect on Hover */
.glow-hover {
  transition: box-shadow var(--duration-base) var(--ease-in-out);
}

.glow-hover:hover {
  box-shadow: var(--glow-blue);
}

/* Glass Effect */
.glass {
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Selection */
::selection {
  background: var(--color-primary-alpha);
  color: var(--color-text);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-dark);
}
