/* ====================================
   Theme System - Light & Dark Mode
   ==================================== */

:root {
    /* Light Mode Colors - Yellow/Gold Theme */
    --primary: #fbbf24;
    --primary-dark: #f59e0b;
    --primary-light: #fde68a;
    --secondary: #f97316;
    --accent: #fb923c;
    
    /* Background Colors */
    --bg-main: #ffffff;
    --bg-secondary: #fefce8;
    --bg-card: #fffbeb;
    --bg-overlay: rgba(251, 191, 36, 0.05);
    
    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* Border Colors */
    --border-light: #fef3c7;
    --border-medium: #fde68a;
    --border-dark: #fbbf24;
    
    /* Shadow Colors */
    --shadow-sm: 0 1px 2px rgba(251, 191, 36, 0.05);
    --shadow-md: 0 4px 6px rgba(251, 191, 36, 0.1);
    --shadow-lg: 0 10px 15px rgba(251, 191, 36, 0.15);
    --shadow-xl: 0 20px 25px rgba(251, 191, 36, 0.2);
    
    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #fbbf24 0%, #f59e0b 35%, #d97706 70%, #b45309 100%);
    --gradient-secondary: linear-gradient(135deg, #fb923c 0%, #f97316 35%, #ea580c 70%, #c2410c 100%);
}

/* Dark Mode Colors */
.dark-mode {
    /* Primary Colors - Blue Theme for Dark Mode */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #8b5cf6;
    --accent: #a78bfa;
    
    /* Background Colors - Navy Dark Theme */
    --bg-main: #0a0e27;
    --bg-secondary: #141937;
    --bg-card: #1a1f3a;
    --bg-overlay: rgba(59, 130, 246, 0.05);
    
    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Border Colors */
    --border-light: #334155;
    --border-medium: #475569;
    --border-dark: #64748b;
    
    /* Shadow Colors */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    
    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #1e40af 25%, #3b82f6 50%, #60a5fa 75%, #93c5fd 100%);
    --gradient-secondary: linear-gradient(135deg, #5b21b6 0%, #6d28d9 25%, #8b5cf6 50%, #a78bfa 75%, #c4b5fd 100%);
}

/* Base Styles */
body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

/* Card Styles */
.card-theme {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card-theme:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Container Styles */
.container-theme {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
}

/* Text Styles */
.text-primary-theme {
    color: var(--text-primary);
}

.text-secondary-theme {
    color: var(--text-secondary);
}

.text-muted-theme {
    color: var(--text-muted);
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Gradient Background */
.gradient-bg {
    background: var(--gradient-primary);
}

.gradient-bg-secondary {
    background: var(--gradient-secondary);
}

/* Border Styles */
.border-theme {
    border-color: var(--border-light);
}

.border-theme-medium {
    border-color: var(--border-medium);
}

.border-theme-dark {
    border-color: var(--border-dark);
}

/* Input Styles */
.input-theme {
    background-color: var(--bg-card);
    border: 2px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.input-theme:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--bg-overlay);
}

.input-theme::placeholder {
    color: var(--text-muted);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: var(--shadow-xl);
}

.theme-toggle svg {
    width: 30px;
    height: 30px;
    color: white;
    transition: transform 0.3s ease;
}

/* Loading Animation */
.loading-spinner {
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade Animations */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale Animation */
.scale-in {
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Animation */
.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Overlay */
.overlay-theme {
    background-color: var(--bg-overlay);
    backdrop-filter: blur(10px);
}

/* Divider */
.divider-theme {
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.3;
}

/* Badge */
.badge-theme {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Alert */
.alert-theme {
    background-color: var(--bg-card);
    border-right: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .theme-toggle {
        width: 50px;
        height: 50px;
        top: 1rem;
        left: 1rem;
    }
    
    .theme-toggle svg {
        width: 24px;
        height: 24px;
    }
}
