/* Theme System - CSS Variables */

/* Light Theme (Default) */
:root {
    /* Colors */
    --primary-color: #667eea;
    --primary-hover: #5a6fd8;
    --secondary-color: #764ba2;
    --accent-color: #ff6b6b;
    --accent-hover: #ee5a52;
    
    /* Background Colors */
    --body-bg: #f8fafc;
    --container-bg: rgba(255, 255, 255, 0.95);
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --overlay-bg: rgba(255, 255, 255, 0.2);
    
    /* Text Colors */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-light: #ffffff;
    
    /* Border Colors */
    --border-color: #e1e5e9;
    --border-light: rgba(255, 255, 255, 0.2);
    --border-focus: #667eea;
    
    /* Shadow Colors */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-colored: rgba(102, 126, 234, 0.2);
    --shadow-accent: rgba(255, 107, 107, 0.2);
    --modal-backdrop: rgba(0, 0, 0, 0.5);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Dark Theme */
[data-theme="dark"] {
    /* Colors */
    --primary-color: #8b93ff;
    --primary-hover: #7c85ff;
    --secondary-color: #b366f7;
    --accent-color: #ff7a7a;
    --accent-hover: #ff6b6b;
    
    /* Background Colors */
    --body-bg: #0a0f1c;
    --container-bg: rgba(20, 30, 48, 0.95);
    --navbar-bg: rgba(20, 30, 48, 0.98);
    --card-bg: #141e30;
    --overlay-bg: rgba(20, 30, 48, 0.4);
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #d1d9e6;
    --text-muted: #a0a9ba;
    --text-light: #ffffff;
    
    /* Border Colors */
    --border-color: #2a3441;
    --border-light: rgba(160, 169, 186, 0.15);
    --border-focus: #8b93ff;
    
    /* Shadow Colors */
    --shadow-light: rgba(0, 0, 0, 0.4);
    --shadow-medium: rgba(0, 0, 0, 0.5);
    --shadow-colored: rgba(139, 147, 255, 0.25);
    --shadow-accent: rgba(255, 122, 122, 0.25);
    --modal-backdrop: rgba(0, 0, 0, 0.75);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b93ff 0%, #b366f7 100%);
    --gradient-accent: linear-gradient(135deg, #ff7a7a 0%, #ff6b6b 100%);
    --gradient-bg: linear-gradient(135deg, #0a0f1c 0%, #141e30 100%);
}

/* Theme Transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--container-bg);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px var(--shadow-colored);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

/* Theme toggle for navbar */
.navbar .theme-toggle {
    margin-left: 16px;
}

/* Theme toggle for login page */
.login-theme-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

/* Icons for theme toggle */
.theme-icon {
    display: block;
}

[data-theme="dark"] .light-icon {
    display: none;
}

[data-theme="dark"] .dark-icon {
    display: block;
}

:root .light-icon {
    display: block;
}

:root .dark-icon {
    display: none;
}

/* Responsive theme toggle */
@media (max-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
    
    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .login-theme-toggle,
    .language-selector {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin: 16px 0;
        display: flex;
        justify-content: center;
    }
}
