/* ============================================
   quangit.online — Global Design System
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- CSS Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

/* --- Design Tokens --- */
:root {
  /* Colors - Primary Palette */
  --primary-50:  #f0eeff;
  --primary-100: #d9d5ff;
  --primary-200: #b3abff;
  --primary-300: #8d81ff;
  --primary-400: #7b6fff;
  --primary-500: #6C63FF;
  --primary-600: #5a52d9;
  --primary-700: #4840b3;
  --primary-800: #362f8c;
  --primary-900: #241f66;

  /* Colors - Secondary (Cyan) */
  --secondary-50:  #e0fbff;
  --secondary-100: #b3f4ff;
  --secondary-200: #80ecff;
  --secondary-300: #4de4ff;
  --secondary-400: #26ddff;
  --secondary-500: #00D9FF;
  --secondary-600: #00b8d9;
  --secondary-700: #0097b3;
  --secondary-800: #00768c;
  --secondary-900: #005566;

  /* Colors - Accent (Pink) */
  --accent-50:  #fff0f5;
  --accent-100: #ffd6e5;
  --accent-200: #ffadc9;
  --accent-300: #ff85ae;
  --accent-400: #ff6b9d;
  --accent-500: #FF6B9D;
  --accent-600: #d94d7c;
  --accent-700: #b3335e;
  --accent-800: #8c1f42;
  --accent-900: #660f2a;

  /* Semantic Colors */
  --success-500: #22c55e;
  --success-600: #16a34a;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --danger-500:  #ef4444;
  --danger-600:  #dc2626;
  --info-500:    #3b82f6;
  --info-600:    #2563eb;

  /* Background Colors */
  --bg-primary:    #0a0a1a;
  --bg-secondary:  #111128;
  --bg-tertiary:   #1a1a2e;
  --bg-elevated:   #1e1e3a;
  --bg-surface:    rgba(255, 255, 255, 0.03);
  --bg-hover:      rgba(255, 255, 255, 0.06);
  --bg-active:     rgba(255, 255, 255, 0.08);

  /* Glass Effect */
  --glass-bg:      rgba(255, 255, 255, 0.05);
  --glass-border:  rgba(255, 255, 255, 0.08);
  --glass-shadow:  0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-blur:    12px;

  /* Text Colors */
  --text-primary:   #f0f0f0;
  --text-secondary: #a0a0b8;
  --text-tertiary:  #6b6b80;
  --text-inverse:   #0a0a1a;
  --text-accent:    var(--primary-400);

  /* Border Colors */
  --border-subtle:   rgba(255, 255, 255, 0.06);
  --border-default:  rgba(255, 255, 255, 0.10);
  --border-strong:   rgba(255, 255, 255, 0.15);
  --border-focus:    var(--primary-500);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.8125rem;  /* 13px */
  --text-base: 0.875rem;   /* 14px */
  --text-md:   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 */
  --text-5xl:  3rem;       /* 48px */
  --text-6xl:  3.75rem;    /* 60px */

  /* Font Weights */
  --font-light:     300;
  --font-regular:   400;
  --font-medium:    500;
  --font-semibold:  600;
  --font-bold:      700;
  --font-extrabold: 800;

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

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-2xl:  28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg:   0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-xl:   0 16px 50px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(108, 99, 255, 0.15);

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-dropdown:  100;
  --z-sticky:    200;
  --z-overlay:   300;
  --z-modal:     400;
  --z-toast:     500;
  --z-tooltip:   600;

  /* Layout */
  --sidebar-width:     260px;
  --sidebar-collapsed: 72px;
  --header-height:     64px;
  --content-max-width: 1200px;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-400), var(--secondary-500), var(--accent-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-subtle {
  background: linear-gradient(135deg, var(--primary-300), var(--secondary-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

/* --- Selection --- */
::selection {
  background: var(--primary-500);
  color: white;
}
