/* ===============================
   RESET & BASE
   =============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===============================
   DESIGN TOKENS
   =============================== */
:root {
    /* ---------- PRIMARY COLORS ---------- */
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #6366F1;
    --primary-50: #EEF2FF;
    --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);

    /* ---------- SECONDARY ---------- */
    --secondary: #7C3AED;
    --secondary-light: #8B5CF6;

    /* ---------- STATUS COLORS ---------- */
    --success: #10B981;
    --success-light: #34D399;
    --warning: #F59E0B;
    --warning-light: #FBBF24;
    --danger: #EF4444;
    --danger-light: #F87171;

    /* Inspiration */
    --inspiration: #F59E0B;
    --inspiration-light: #FBBF24;

    /* ---------- NEUTRALS ---------- */
    --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-850: #15203b;
    --gray-900: #0F172A;

    /* ---------- LIGHT THEME ---------- */
    --bg-color: var(--gray-50);
    --card-bg: #FFFFFF;
    --card-bg-alt: var(--gray-50);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);

    /* 🔧 FIX: softer borders to avoid boxed Step-3 look */
    --border-color: rgba(226, 232, 240, 0.8);
    --border-light: var(--gray-100);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.14);

    /* Gradients */
    --header-gradient: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
    --accent-gradient: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);

    /* 🔧 FIX: glass background opacity (Step-3 visual fix) */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.2);

    /* ---------- PLATFORM LOGO BACKGROUNDS ---------- */
    --platform-logo-bg-light: #FFFFFF;
    --platform-logo-bg-dark: transparent;

    /* ---------- TYPOGRAPHY ---------- */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Consolas', 'Menlo', monospace;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;

    /* ---------- SPACING ---------- */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;

    /* ---------- RADIUS ---------- */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* ---------- 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: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* 🔧 FIX: sane z-index hierarchy (click + hover bugs fixed) */
    --z-sticky: 20;
    --z-tooltip: 60;
    --z-dropdown: 100;
    --z-popover: 200;
    --z-modal: 300;
}

/* ===============================
   DARK THEME
   =============================== */
.dark-theme {
    --bg-color: var(--gray-900);
    --card-bg: var(--gray-800);
    --card-bg-alt: var(--gray-850);
    --text-primary: var(--gray-50);
    --text-secondary: var(--gray-300);
    --text-tertiary: var(--gray-400);

    /* 🔧 FIX: lighter borders in dark mode */
    --border-color: rgba(148, 163, 184, 0.25);
    --border-light: var(--gray-800);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);

    --header-gradient: linear-gradient(135deg, #3730A3 0%, #312E81 100%);
    --glass-bg: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --inspiration: #F59E0B;
}

/* ===============================
   BODY
   =============================== */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition-base), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* 🔧 FIX: do NOT hide layout bugs */
    overflow-x: clip;
}
