/**
 * 🎨 BesserGrowen Messenger - Design Tokens
 * Unified Design System für alle Besser* Portale
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

:root {
  /* ========================================
     COLOR SYSTEM - Portal Variants
     ======================================== */
  
  /* BesserGrowen - Glassmorphism/Purple/Pink */
  --growen-primary: #7c3aed;
  --growen-primary-dark: #6d28d9;
  --growen-accent: #ec4899;
  --growen-accent-light: #f9a8d4;
  --growen-gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  --growen-glass-bg: rgba(255, 255, 255, 0.5);
  --growen-glass-border: rgba(255, 255, 255, 0.7);
  
  /* BesserNews - Orange Clean */
  --news-primary: #ff6b35;
  --news-primary-hover: #ff854a;
  --news-accent: #ffa41b;
  --news-gradient: linear-gradient(135deg, #ff6b35 0%, #ffa41b 100%);
  
  /* BesserAI - Netflix Red */
  --ai-primary: #e50914;
  --ai-primary-dark: #b91c1c;
  --ai-accent: #dc2626;
  --ai-gradient: linear-gradient(135deg, #e50914 0%, #b91c1c 100%);
  
  /* Active Theme (Default: BesserGrowen) */
  --primary: var(--growen-primary);
  --primary-dark: var(--growen-primary-dark);
  --accent: var(--growen-accent);
  --accent-light: var(--growen-accent-light);
  --gradient-primary: var(--growen-gradient);
  --glass-bg: var(--growen-glass-bg);
  --glass-border: var(--growen-glass-border);
  
  /* ========================================
     NEUTRALS & GRAYS
     ======================================== */
  --white: #ffffff;
  --black: #000000;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* ========================================
     SEMANTIC COLORS
     ======================================== */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --text-inverse: var(--white);
  
  --bg-primary: var(--white);
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--gray-100);
  
  --border-light: var(--gray-200);
  --border-medium: var(--gray-300);
  --border-dark: var(--gray-400);
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* ========================================
     GLASSMORPHISM
     ======================================== */
  --glass-backdrop: rgba(255, 255, 255, 0.5);
  --glass-backdrop-dark: rgba(15, 23, 42, 0.7);
  --glass-blur: blur(20px);
  --glass-blur-heavy: blur(40px);
  --glass-border-light: rgba(255, 255, 255, 0.8);
  --glass-border-dark: rgba(255, 255, 255, 0.2);
  
  /* ========================================
     SHADOWS
     ======================================== */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3);
  
  /* ========================================
     SPACING SCALE
     ======================================== */
  --space-0: 0;
  --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-xs: 0.25rem;   /* 4px */
  --radius-sm: 0.5rem;    /* 8px */
  --radius-md: 0.75rem;   /* 12px */
  --radius-lg: 1rem;      /* 16px */
  --radius-xl: 1.25rem;   /* 20px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-3xl: 2rem;     /* 32px */
  --radius-full: 9999px;
  
  /* ========================================
     TYPOGRAPHY
     ======================================== */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Poppins', var(--font-sans);
  
  --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-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* ========================================
     Z-INDEX SCALE
     ======================================== */
  --z-base: 0;
  --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;
  
  /* ========================================
     TRANSITIONS & ANIMATIONS
     ======================================== */
  --duration-instant: 100ms;
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
  
  --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);
  
  /* ========================================
     MOBILE-SPECIFIC
     ======================================== */
  --safe-area-inset-top: env(safe-area-inset-top, 0px);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
  
  --mobile-header-height: calc(56px + var(--safe-area-inset-top));
  --mobile-bottom-nav-height: calc(60px + var(--safe-area-inset-bottom));
  
  /* ========================================
     BREAKPOINTS (for JS usage)
     ======================================== */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* ========================================
   DARK MODE
   ======================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: var(--gray-50);
    --text-secondary: var(--gray-300);
    --text-muted: var(--gray-400);
    --text-inverse: var(--gray-900);
    
    --bg-primary: var(--gray-900);
    --bg-secondary: var(--gray-800);
    --bg-tertiary: var(--gray-700);
    
    --border-light: var(--gray-700);
    --border-medium: var(--gray-600);
    --border-dark: var(--gray-500);
    
    --glass-backdrop: rgba(15, 23, 42, 0.7);
    --glass-border-light: rgba(255, 255, 255, 0.1);
  }
}

/* ========================================
   THEME UTILITIES
   ======================================== */
[data-theme="bessergrowen"] {
  --primary: var(--growen-primary);
  --accent: var(--growen-accent);
  --gradient-primary: var(--growen-gradient);
}

[data-theme="bessernews"] {
  --primary: var(--news-primary);
  --accent: var(--news-accent);
  --gradient-primary: var(--news-gradient);
}

[data-theme="besserai"] {
  --primary: var(--ai-primary);
  --accent: var(--ai-accent);
  --gradient-primary: var(--ai-gradient);
}
