/* CSS/main.css - Design System & Global Styles - FIXED VERSION */

/* Font and Body Setup */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Design System Variables */
:root {
    /* Colors */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    
    --secondary-50: #faf5ff;
    --secondary-100: #f3e8ff;
    --secondary-500: #a855f7;
    --secondary-600: #9333ea;
    --secondary-700: #7c3aed;
    
    --accent-50: #ecfdf5;
    --accent-100: #d1fae5;
    --accent-500: #10b981;
    --accent-600: #059669;
    --accent-700: #047857;
    
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    
    /* Shadows */
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* FIXED: Improved Glass Effects with better contrast */
.glass-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-medium);
}

.sidebar-blur {
    background: #1f2937; /* Solid dark background instead of translucent */
    border-right: 1px solid #374151;
}

/* FIXED: Card Styles with colored backgrounds for better visibility */
.content-card {
    background: #f0f9ff; /* Light blue */
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-medium);
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.metric-card {
    background: #f0fdf4; /* Light green */
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Button Styles */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-gradient:active {
    transform: translateY(0);
}

.btn-gradient:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* FIXED: Form Styles with better contrast */
.form-input {
    transition: all var(--transition-fast);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    width: 100%;
    font-size: 0.875rem;
    background: #ffffff;
    color: #1f2937;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:disabled {
    background-color: var(--neutral-50);
    cursor: not-allowed;
    color: #6b7280;
}

/* FIXED: Navigation with solid backgrounds */
.nav-pill {
    transition: all var(--transition-fast);
    border-radius: var(--radius-xl);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.nav-pill.active {
    background: #0284c7;
    color: white;
    box-shadow: var(--shadow-soft);
}

.nav-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Status Indicators */
.status-indicator {
    position: relative;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: var(--accent-500);
    border-radius: 50%;
    border: 2px solid white;
}

/* Progress Bars */
.progress-bar {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    background-size: 200% 200%;
    border-radius: var(--radius-md);
    height: 0.5rem;
}

/* FIXED: Utility Classes with better contrast */
.hover-lift {
    transition: all var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* FIXED: Text Utilities with better readability */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

/* FIXED: Page Headers with white backgrounds */
.page-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

.page-title {
    color: #1f2937;
    font-weight: 600;
}

.page-description {
    color: #6b7280;
}

/* FIXED: Notification styles with solid backgrounds */
.notification {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    box-shadow: var(--shadow-medium);
}

.notification.success {
    background: #10b981;
    color: white;
    border-color: #059669;
}

.notification.error {
    background: #ef4444;
    color: white;
    border-color: #dc2626;
}

.notification.warning {
    background: #f59e0b;
    color: white;
    border-color: #d97706;
}

.notification.info {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}

/* FIXED: Modal backgrounds */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-strong);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-card {
        margin: var(--space-sm);
        border-radius: var(--radius-lg);
    }
    
    .sidebar-blur {
        position: fixed;
        z-index: 50;
        height: 100vh;
    }
    
    .nav-pill {
        padding: var(--space-md);
    }
}

/* Focus Management */
*:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Print Styles */
@media print {
    .sidebar-blur,
    .nav-pill,
    .btn-gradient {
        display: none;
    }
    
    .content-card {
        box-shadow: none;
        border: 1px solid var(--neutral-200);
    }
}

/* FIXED: Component overrides for better contrast */
.subjects-header,
.upload-header,
.practice-header {
    color: white !important;
}

.subjects-header h2,
.upload-header h2,
.practice-header h2 {
    color: white !important;
}

.subjects-header p,
.upload-header p,
.practice-header p {
    color: rgba(255, 255, 255, 0.8) !important;
}