/* ============================================
   TON WHALE TRACKER DESIGN TOKENS
   Version: 1.0.0

   Single source of truth for all design tokens
   Used by: Landing, Admin Panel, Mini-App
   ============================================ */

:root {
  /* ----------------------------------------
     1. BRAND COLORS
     ---------------------------------------- */
  --color-brand-primary: #0088cc;
  --color-brand-primary-rgb: 0, 136, 204;
  --color-brand-primary-dark: #006699;
  --color-brand-primary-light: #33a3d9;

  --color-brand-accent: #00d4aa;
  --color-brand-accent-rgb: 0, 212, 170;
  --color-brand-accent-dark: #00a88a;
  --color-brand-accent-light: #33e0bf;

  --color-brand-gradient: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-accent) 100%);
  --color-brand-gradient-hover: linear-gradient(135deg, var(--color-brand-primary-dark) 0%, var(--color-brand-accent-dark) 100%);

  /* ----------------------------------------
     2. SEMANTIC COLORS
     ---------------------------------------- */
  /* Success / Profit */
  --color-success: #22C55E;
  --color-success-rgb: 34, 197, 94;
  --color-success-light: #4ADE80;
  --color-success-dark: #16A34A;
  --color-success-bg: rgba(34, 197, 94, 0.1);

  /* Error / Loss */
  --color-error: #EF4444;
  --color-error-rgb: 239, 68, 68;
  --color-error-light: #F87171;
  --color-error-dark: #DC2626;
  --color-error-bg: rgba(239, 68, 68, 0.1);

  /* Warning */
  --color-warning: #F59E0B;
  --color-warning-rgb: 245, 158, 11;
  --color-warning-light: #FBBF24;
  --color-warning-dark: #D97706;
  --color-warning-bg: rgba(245, 158, 11, 0.1);

  /* Info */
  --color-info: #3B82F6;
  --color-info-rgb: 59, 130, 246;
  --color-info-light: #60A5FA;
  --color-info-dark: #2563EB;
  --color-info-bg: rgba(59, 130, 246, 0.1);

  /* ----------------------------------------
     3. WHALE TIER COLORS
     ---------------------------------------- */
  /* Mega Whale - Gold/Amber */
  --color-tier-mega: #F59E0B;
  --color-tier-mega-rgb: 245, 158, 11;
  --color-tier-mega-light: #FCD34D;
  --color-tier-mega-bg: rgba(245, 158, 11, 0.15);

  /* Large Whale - Blue */
  --color-tier-large: #3B82F6;
  --color-tier-large-rgb: 59, 130, 246;
  --color-tier-large-light: #60A5FA;
  --color-tier-large-bg: rgba(59, 130, 246, 0.15);

  /* Medium Whale - Purple */
  --color-tier-medium: #8B5CF6;
  --color-tier-medium-rgb: 139, 92, 246;
  --color-tier-medium-light: #A78BFA;
  --color-tier-medium-bg: rgba(139, 92, 246, 0.15);

  /* ----------------------------------------
     4. TYPOGRAPHY
     ---------------------------------------- */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Monaco', 'Consolas', 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 */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

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

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;

  /* ----------------------------------------
     5. SPACING (4px Grid)
     ---------------------------------------- */
  --space-0: 0;
  --space-px: 1px;
  --space-0-5: 0.125rem;   /* 2px */
  --space-1: 0.25rem;      /* 4px */
  --space-1-5: 0.375rem;   /* 6px */
  --space-2: 0.5rem;       /* 8px */
  --space-2-5: 0.625rem;   /* 10px */
  --space-3: 0.75rem;      /* 12px */
  --space-3-5: 0.875rem;   /* 14px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.25rem;      /* 20px */
  --space-6: 1.5rem;       /* 24px */
  --space-7: 1.75rem;      /* 28px */
  --space-8: 2rem;         /* 32px */
  --space-9: 2.25rem;      /* 36px */
  --space-10: 2.5rem;      /* 40px */
  --space-11: 2.75rem;     /* 44px */
  --space-12: 3rem;        /* 48px */
  --space-14: 3.5rem;      /* 56px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */
  --space-28: 7rem;        /* 112px */
  --space-32: 8rem;        /* 128px */

  /* ----------------------------------------
     6. 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-3xl: 2rem;      /* 32px */
  --radius-full: 9999px;

  /* ----------------------------------------
     7. SHADOWS
     ---------------------------------------- */
  /* Dark Theme Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

  /* Glow Effects */
  --shadow-glow-primary: 0 0 20px rgba(var(--color-brand-primary-rgb), 0.3);
  --shadow-glow-accent: 0 0 20px rgba(var(--color-brand-accent-rgb), 0.3);
  --shadow-glow-success: 0 0 20px rgba(var(--color-success-rgb), 0.3);
  --shadow-glow-error: 0 0 20px rgba(var(--color-error-rgb), 0.3);

  /* ----------------------------------------
     8. TRANSITIONS & ANIMATIONS
     ---------------------------------------- */
  /* Durations */
  --duration-75: 75ms;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-300: 300ms;
  --duration-500: 500ms;
  --duration-700: 700ms;
  --duration-1000: 1000ms;

  /* Semantic Durations */
  --duration-fast: var(--duration-100);
  --duration-normal: var(--duration-200);
  --duration-slow: var(--duration-300);
  --duration-slower: var(--duration-500);

  /* Easing Functions */
  --ease-linear: linear;
  --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);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ----------------------------------------
     9. Z-INDEX SCALE
     ---------------------------------------- */
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;
  --z-max: 9999;

  /* ----------------------------------------
     10. BREAKPOINTS (for reference)
     ---------------------------------------- */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* ----------------------------------------
     11. CONTAINER
     ---------------------------------------- */
  --container-max-width: 1200px;
  --container-padding: var(--space-5);
}

/* ============================================
   DARK THEME (Default)
   ============================================ */
:root,
.theme-dark {
  /* Backgrounds */
  --color-bg-primary: #0f0f23;
  --color-bg-secondary: #1a1a2e;
  --color-bg-tertiary: #252542;
  --color-bg-elevated: #2a2a4a;

  /* Text */
  --color-text-primary: #ffffff;
  --color-text-secondary: #8b8b9a;
  --color-text-muted: #6b6b7a;
  --color-text-disabled: #4a4a5a;

  /* Borders */
  --color-border: #2a2a4a;
  --color-border-light: #3a3a5a;
  --color-border-focus: var(--color-brand-primary);

  /* Overlays */
  --color-overlay: rgba(0, 0, 0, 0.6);
  --color-backdrop: rgba(15, 15, 35, 0.95);

  /* Input backgrounds */
  --color-input-bg: var(--color-bg-tertiary);
  --color-input-bg-hover: var(--color-bg-elevated);

  color-scheme: dark;
}

/* ============================================
   LIGHT THEME
   ============================================ */
.theme-light {
  /* Backgrounds */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8f9fc;
  --color-bg-tertiary: #f0f2f5;
  --color-bg-elevated: #ffffff;

  /* Text */
  --color-text-primary: #0f0f23;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;
  --color-text-disabled: #d1d5db;

  /* Borders */
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --color-border-focus: var(--color-brand-primary);

  /* Overlays */
  --color-overlay: rgba(0, 0, 0, 0.3);
  --color-backdrop: rgba(255, 255, 255, 0.95);

  /* Input backgrounds */
  --color-input-bg: var(--color-bg-secondary);
  --color-input-bg-hover: var(--color-bg-tertiary);

  /* Light theme shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  color-scheme: light;
}

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

/* Text Colors */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-brand { color: var(--color-brand-primary); }
.text-accent { color: var(--color-brand-accent); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }
.text-info { color: var(--color-info); }

/* Tier Text Colors */
.text-tier-mega { color: var(--color-tier-mega); }
.text-tier-large { color: var(--color-tier-large); }
.text-tier-medium { color: var(--color-tier-medium); }

/* Background Colors */
.bg-primary { background-color: var(--color-bg-primary); }
.bg-secondary { background-color: var(--color-bg-secondary); }
.bg-tertiary { background-color: var(--color-bg-tertiary); }
.bg-brand { background-color: var(--color-brand-primary); }
.bg-accent { background-color: var(--color-brand-accent); }

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

/* Focus Ring */
.focus-ring:focus {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
}

.focus-ring:focus:not(:focus-visible) {
  outline: none;
}

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