/* =============================================================================
   VerbaMind Design System - DARK THEME
   AI Learning Platform with Global RAG
   Version: 2.0
   Created: November 11, 2025
   ============================================================================= */

:root {
    /* =================================================================
       BRAND COLORS (Dark Theme + Lime Accent)
       ================================================================= */

    /* Primary Brand - Indigo (Knowledge) */
    --color-primary: #6366F1;
    --color-primary-hover: #4F46E5;
    --color-primary-light: #E0E7FF;

    /* Accent - Lime (AI/Tech) */
    --color-accent: #84CC16;
    --color-accent-hover: #65A30D;
    --color-accent-light: #ECFCCB;

    /* Dark Theme Backgrounds */
    --color-bg-primary: #1F2937;    /* Main background */
    --color-bg-secondary: #111827;  /* Cards, sidebar */
    --color-bg-tertiary: #374151;   /* Elevated */
    --color-bg-hover: #4B5563;      /* Hover states */

    /* Text Colors */
    --color-text-primary: #F9FAFB;
    --color-text-secondary: #D1D5DB;
    --color-text-tertiary: #9CA3AF;

    /* Borders */
    --color-border: #374151;
    --color-border-light: #4B5563;

    /* Semantic Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #3B82F6;

    /* =================================================================
       SPACING SYSTEM (4px base - NoteGPT standard)
       ================================================================= */

    --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-7: 1.75rem;   /* 28px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */

    /* =================================================================
       BORDER RADIUS (NoteGPT standard)
       ================================================================= */

    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.25rem;   /* 20px */
    --radius-full: 9999px;

    /* =================================================================
       TYPOGRAPHY (14px baseline - NoteGPT standard)
       ================================================================= */

    --font-sans: 'Inter', -apple-system, sans-serif;
    --text-xs: 0.75rem;     /* 12px - tags, footnotes */
    --text-sm: 0.875rem;    /* 14px - BASELINE */
    --text-base: 1rem;      /* 16px - sections */
    --text-lg: 1.125rem;    /* 18px - headings */
    --text-xl: 1.25rem;     /* 20px - card titles */
    --text-2xl: 1.5rem;     /* 24px - main titles */
    --text-3xl: 1.625rem;   /* 26px - display */

    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* =================================================================
       ICON SIZES (NoteGPT standard)
       ================================================================= */

    --icon-xs: 0.875rem;    /* 14px - inline */
    --icon-sm: 1rem;        /* 16px - small */
    --icon-md: 1.125rem;    /* 18px - medium */
    --icon-base: 1.25rem;   /* 20px - standard */
    --icon-lg: 1.75rem;     /* 28px - accent */

    /* =================================================================
       BUTTON HEIGHTS (NoteGPT standard)
       ================================================================= */

    --btn-sm: 2rem;         /* 32px */
    --btn-md: 2.25rem;      /* 36px */
    --btn-lg: 2.5rem;       /* 40px */

    /* =================================================================
       SHADOWS (darker for dark theme)
       ================================================================= */

    --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(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);

    /* =================================================================
       TRANSITIONS
       ================================================================= */

    --transition-base: 200ms ease;
    --transition-fast: 150ms ease;
}

/* =============================================================================
   BASE STYLES
   ============================================================================= */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-sm);  /* 14px baseline - NoteGPT standard */
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    min-height: 100vh;
}

/* Typography */
h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-hover);
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Images */
img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Buttons */
button {
    font-family: inherit;
    cursor: pointer;
}

/* Inputs */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Scrollbar (webkit) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-hover);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-light);
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

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

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.transition {
    transition: all var(--transition-base);
}

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

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes typingPulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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