/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * BLOCKEXPLORER DESIGN SYSTEM - "ELECTRIC GLASS" PURPLE/BLUE EDITION
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *
 * DESIGN IDENTITY:
 * This is the BlockExplorer - A technical blockchain data visualization tool
 * Theme: Purple/Blue "Liquid Glassmorphism" for professional, technical aesthetic
 *
 * IMPORTANT - COLOR SEPARATION:
 * ┌─────────────────────────────────────────────────────────────────────────┐
 * │ BlockExplorer = Purple/Blue (#8a2be2, #4169e1, #00d4ff)                │
 * │ Fulgura DEX   = Green Brand (#C5EE49) - SEE DEX PROJECT                │
 * └─────────────────────────────────────────────────────────────────────────┘
 *
 * DESIGN PHILOSOPHY - "ELECTRIC GLASS":
 *
 * 1. DEPTH: Purple (#8a2be2) represents blockchain depth & cryptographic security
 * 2. TRUST: Royal Blue (#4169e1) represents reliability & data transparency
 * 3. CLARITY: Cyan (#00d4ff) represents data precision & analytical insights
 * 4. GLASS: Translucent layers showcase technical sophistication & complexity
 *
 * Visual Language: Premium glassmorphism with purple-blue gradients creates
 * a technical, trustworthy atmosphere distinct from trading/DEX platforms.
 *
 * Inspiration: SiteCom, Apple Design, Vercel, Stripe Dashboard
 * Updated: 2025-11-24
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

:root {
  /* ============================================
     PRIMARY COLORS - Purple/Blue Gradient Theme
     BlockExplorer Identity Colors (NOT Fulgura Brand)
     ============================================ */
  --primary-purple: #8a2be2;    /* Blockchain Depth & Security */
  --primary-blue: #4169e1;      /* Trust & Reliability */
  --cyan: #00d4ff;              /* Data Clarity & Precision */
  --green: #00ff88;             /* Success States */

  /* ============================================
     FULGURA BRAND COLOR - NOT FOR BLOCKEXPLORER
     Use this ONLY for explicit Fulgura branding
     For BlockExplorer UI, use Purple/Blue above
     ============================================ */
  /* --fulgura-accent: #C5EE49; */  /* Fulgura DEX Green - DO NOT USE for BlockExplorer theme */

  /* ============================================
     GRAYSCALE FOUNDATION
     ============================================ */
  --gray-950: #0a0a0a;
  --gray-900: #171717;
  --gray-800: #262626;
  --gray-700: #404040;
  --gray-600: #525252;
  --gray-500: #737373;
  --gray-400: #a3a3a3;
  --gray-300: #d4d4d4;
  --gray-200: #e5e5e5;
  --gray-100: #f5f5f5;
  --gray-50: #fafafa;

  /* ============================================
     GLASSMORPHISM COLORS
     ============================================ */
  --card-background: rgba(20, 20, 40, 0.4);
  --glass-background: rgba(20, 20, 40, 0.3);
  --glass-bg: rgba(20, 20, 40, 0.4);
  --glass-border: rgba(138, 43, 226, 0.2);
  --border-color: rgba(138, 43, 226, 0.2);
  --border-primary: rgba(138, 43, 226, 0.3);
  --text-secondary: #a8a8b3;

  /* Dashboard specific */
  --primary-cyan: #00d4ff;

  /* ============================================
     STATUS COLORS
     ============================================ */
  --status-success: var(--green);
  --status-error: #ef4444;
  --status-warning: #eab308;
  --status-info: var(--cyan);

  /* ============================================
     SEMANTIC TOKENS - Dark Theme (Default)
     ============================================ */

  /* Backgrounds */
  --bg-primary: #000000;
  --bg-secondary: #0a0014;
  --bg-tertiary: rgba(20, 20, 40, 0.6);
  --bg-elevated: var(--card-background);
  --bg-overlay: rgba(0, 0, 0, 0.8);

  /* Surfaces - Liquid Glassmorphism */
  --surface-base: var(--card-background);
  --surface-glass: var(--glass-background);
  --surface-raised: rgba(30, 30, 50, 0.5);

  /* Borders - Purple tinted */
  --border-subtle: rgba(138, 43, 226, 0.15);
  --border-secondary: rgba(138, 43, 226, 0.12);
  --border-medium: rgba(138, 43, 226, 0.25);
  --border-strong: rgba(138, 43, 226, 0.4);

  /* Text */
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: #a8a8b3;
  --text-muted: rgba(255, 255, 255, 0.45);
  --text-disabled: rgba(255, 255, 255, 0.25);
  --text-accent: var(--primary-purple);

  /* Interactive */
  --interactive-primary: var(--primary-purple);
  --interactive-primary-hover: #9333ea;
  --interactive-secondary: rgba(138, 43, 226, 0.1);
  --interactive-secondary-hover: rgba(138, 43, 226, 0.2);

  /* ============================================
     GRADIENTS
     ============================================ */
  --gradient-primary: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
  --gradient-text: linear-gradient(135deg, var(--primary-purple), var(--cyan));
  --gradient-scrollbar: linear-gradient(180deg, var(--primary-purple), var(--primary-blue));
  --gradient-button-overlay: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);

  /* ============================================
     SPACING SCALE
     ============================================ */
  --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 */
  --space-24: 6rem;     /* 96px */

  /* Legacy spacing aliases */
  --space-xs: var(--space-1);
  --space-sm: var(--space-2);
  --space-md: var(--space-3);
  --space-base: var(--space-4);
  --space-lg: var(--space-6);
  --space-xl: var(--space-8);
  --space-2xl: var(--space-10);
  --space-3xl: var(--space-12);
  --space-4xl: var(--space-16);

  /* ============================================
     TYPOGRAPHY
     ============================================ */
  /* Font Families */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', 'Consolas', monospace;

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

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

  /* Line Heights */
  --leading-tight: 1.2;
  --leading-normal: 1.6;
  --leading-relaxed: 1.7;

  /* ============================================
     EFFECTS - Liquid Glassmorphism
     ============================================ */

  /* Glassmorphism Blur */
  --blur-glass: blur(20px);
  --blur-heavy: blur(40px);

  /* Shadows with Purple Glow */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(138, 43, 226, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(138, 43, 226, 0.3);
  --shadow-glow: 0 0 20px rgba(138, 43, 226, 0.3);
  --shadow-glow-intense: 0 0 40px rgba(138, 43, 226, 0.6), 0 0 60px rgba(138, 43, 226, 0.3);
  --shadow-card-hover: 0 20px 60px rgba(138, 43, 226, 0.3);

  /* Border Radius */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 1rem;      /* 16px */
  --radius-xl: 1.5rem;    /* 24px */
  --radius-2xl: 2rem;     /* 32px */
  --radius-full: 9999px;

  /* Transitions - Smooth & Premium */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Legacy duration aliases */
  --duration-fast: var(--transition-fast);
  --duration-normal: var(--transition-base);
  --duration-slow: var(--transition-slow);

  /* ============================================
     Z-INDEX SCALE
     ============================================ */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;

  /* ============================================
     LAYOUT
     ============================================ */
  --container-xs: 480px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1400px;

  /* Header */
  --header-height: 72px;
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] {
  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: rgba(255, 255, 255, 0.8);
  --bg-elevated: rgba(255, 255, 255, 0.9);

  /* Surfaces - Lighter glassmorphism */
  --surface-base: rgba(255, 255, 255, 0.7);
  --surface-glass: rgba(255, 255, 255, 0.5);
  --surface-raised: rgba(255, 255, 255, 0.8);

  /* Borders */
  --border-subtle: rgba(138, 43, 226, 0.12);
  --border-secondary: rgba(138, 43, 226, 0.1);
  --border-medium: rgba(138, 43, 226, 0.2);
  --border-strong: rgba(138, 43, 226, 0.35);

  /* Text */
  --text-primary: rgba(0, 0, 0, 0.9);
  --text-secondary: rgba(0, 0, 0, 0.6);
  --text-muted: rgba(0, 0, 0, 0.45);
  --text-disabled: rgba(0, 0, 0, 0.25);
  --text-accent: var(--primary-purple);

  /* Interactive */
  --interactive-primary: var(--primary-purple);
  --interactive-primary-hover: #9333ea;
  --interactive-secondary: rgba(138, 43, 226, 0.08);
  --interactive-secondary-hover: rgba(138, 43, 226, 0.15);

  /* Shadows - More prominent with purple tint */
  --shadow-sm: 0 1px 2px 0 rgba(138, 43, 226, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(138, 43, 226, 0.12);
  --shadow-lg: 0 10px 15px -3px rgba(138, 43, 226, 0.15);
  --shadow-xl: 0 20px 25px -5px rgba(138, 43, 226, 0.2);
  --shadow-glow: 0 0 15px rgba(138, 43, 226, 0.2);
  --shadow-card-hover: 0 20px 40px rgba(138, 43, 226, 0.25);
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Glow effect */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(138, 43, 226, 0.6), 0 0 60px rgba(138, 43, 226, 0.3);
  }
}

/* Shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Fade animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Gradient shift for text */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

/* Text Gradients */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
}

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

/* Glassmorphism */
.glass {
  background: var(--glass-background);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-subtle);
}

.glass-card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--blur-glass);
  transition: all var(--transition-slow);
}

.glass-card:hover {
  border-color: var(--primary-purple);
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
}

/* Animations */
.glow {
  animation: glow 2s ease-in-out infinite;
}

.shimmer {
  animation: shimmer 3s linear infinite;
  background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.1), transparent);
  background-size: 1000px 100%;
}

.fadeInUp {
  animation: fadeInUp 0.8s ease-out forwards;
}

.fadeIn {
  animation: fadeIn 0.6s ease-out forwards;
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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