/* Base Styles - Resets, Variables, Typography */
/* DARK MODE THEME */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables - DARK MODE */
:root {
    /* Primary Colors */
    --primary-blue: #0A84FF;
    --primary-blue-dark: #0066CC;
    --primary-blue-light: #409CFF;
    
    /* Background Colors - Dark Mode */
    --bg-main: #1e1e1e;              /* Main background - dark charcoal */
    --bg-light: #252525;              /* Slightly elevated surfaces */
    --bg-white: #2d2d2d;              /* Cards/panels */
    --bg-sidebar: #252525;            /* Sidebar background */
    
    /* Text Colors - Dark Mode */
    --text-primary: #e4e4e4;          /* Main text - slightly muted white */
    --text-secondary: #a8a8a8;        /* Secondary text */
    --text-tertiary: #a2a1a1;         /* Tertiary text */
    
    /* Border Colors - Dark Mode */
    --border-color: #3a3a3c;          /* Subtle borders */
    --border-light: #48484a;          /* Lighter borders */
    
    /* Message Bubbles - Dark Mode */
    --message-user-bg: #0A84FF;       /* User messages - Apple dark mode blue */
    --message-ai-bg: #3a3a3c;         /* AI messages - dark gray */
    --message-ai-text: #f2f2f7;       /* AI message text */
    
    /* Input Fields - Dark Mode */
    --input-bg: #3a3a3c;              /* Input background */
    --input-bg-focus: #48484a;        /* Input focused state */
    --input-text: #ffffff;            /* Input text color */
    
    /* Complexity Colors - Keep bright for visibility */
    --complexity-low: #34C759;
    --complexity-medium: #FF9500;
    --complexity-high: #FF3B30;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 15px;
    --spacing-xl: 20px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 18px;
    --radius-full: 50%;
    --border-radius: 12px;
    
    /* Shadows - Adjusted for dark mode */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 3px 10px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
    
    /* Transitions */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
}

/* Body */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

/* Buttons Base */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Links */
a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* Scrollbar Styling - Dark Mode */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

.show {
    display: block !important;
}

.flex {
    display: flex !important;
}