/* Theme Configuration */

:root {
    /* Animation timings */
    --transition-speed: 0.3s;
    --theme-transition: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    
    /* Font families */
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'JetBrains Mono', monospace;
    --font-heading: 'Poppins', sans-serif;
    
    /* Font weights */
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    
    /* Font sizes */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    --text-5xl: 3rem;      /* 48px */
    
    /* Spacing */
    --space-1: 0.25rem;    /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */
    --space-24: 6rem;      /* 96px */
    --space-32: 8rem;      /* 128px */
    
    /* Border radius */
    --radius-sm: 0.25rem;  /* 4px */
    --radius-md: 0.5rem;   /* 8px */
    --radius-lg: 0.75rem;  /* 12px */
    --radius-xl: 1rem;     /* 16px */
    --radius-full: 9999px; /* For rounded pills/circles */
}

/* Light Theme (default) */
.light-theme {
    /* Base colors */
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F5F7FA;
    --color-text-primary: #333333;
    --color-text-secondary: #666666;
    --color-accent-primary: #5045E4;
    --color-accent-secondary: #00C2FF;
    --color-success: #2ECC71;
    --color-error: #E74C3C;
    --color-surface: #FFFFFF;
    --color-divider: #E0E0E0;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #5045E4, #00C2FF);
    --gradient-secondary: linear-gradient(135deg, #F5F7FA, #E0E0E0);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Dark Theme */
.dark-theme {
    /* Base colors */
    --color-bg-primary: #121212;
    --color-bg-secondary: #1E1E1E;
    --color-text-primary: #F1F1F1;
    --color-text-secondary: #B0B0B0;
    --color-accent-primary: #7C6FFF;
    --color-accent-secondary: #00D8FF;
    --color-success: #2ECC71;
    --color-error: #E74C3C;
    --color-surface: #232323;
    --color-divider: #333333;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7C6FFF, #00D8FF);
    --gradient-secondary: linear-gradient(135deg, #232323, #121212);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 15px rgba(124, 111, 255, 0.15);
}

/* Theme Transition */
body {
    transition: background-color var(--theme-transition), 
                color var(--theme-transition);
}

/* All elements should transition smoothly */
* {
    transition: background-color var(--theme-transition),
                border-color var(--theme-transition),
                color var(--theme-transition),
                box-shadow var(--theme-transition);
}

/* Theme Toggle Styles */
.theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
    background-color: var(--color-bg-secondary);
}

.theme-toggle:focus {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 2px;
}

.theme-toggle:active {
    transform: scale(0.95);
}

.sun-icon,
.moon-icon {
    position: absolute;
    width: 24px;
    height: 24px;
    transition: all var(--transition-speed) ease;
}

/* Show/hide appropriate icon based on theme */
.light-theme .sun-icon {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.light-theme .moon-icon {
    opacity: 0;
    transform: translateY(10px) rotate(-90deg);
}

.dark-theme .sun-icon {
    opacity: 0;
    transform: translateY(-10px) rotate(90deg);
}

.dark-theme .moon-icon {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

/* In your light-theme section */
.light-theme {
    /* ...existing variables... */
    
    /* RGB versions for opacity controls */
    --color-accent-primary-rgb: 80, 69, 228; /* RGB for #5045E4 */
    --color-accent-secondary-rgb: 0, 194, 255; /* RGB for #00C2FF */
}

/* In your dark-theme section */
.dark-theme {
    /* ...existing variables... */
    
    /* RGB versions for opacity controls */
    --color-accent-primary-rgb: 124, 111, 255; /* RGB for #7C6FFF */
    --color-accent-secondary-rgb: 0, 216, 255; /* RGB for #00D8FF */
}