/* ============================================
   🌟 STELLARPARK AWESOME THEME 🌟
   Beautiful, fun, and smooth theme system
   ============================================ */

/* ============================================
   ☀️ LIGHT THEME - Fresh & Clean
   ============================================ */
:root,
[data-theme="light"] {
    /* Background colors - Soft and inviting */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Text colors - Clear and readable */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-accent: #6366f1;
    
    /* Border colors */
    --border-color: #e2e8f0;
    --border-color-light: #f1f5f9;
    
    /* Navbar - Crisp white */
    --navbar-bg: #ffffff;
    --navbar-text: #1e293b;
    --navbar-border: #e2e8f0;
    
    /* Sidebar - White for light theme */
    --sidebar-bg: #ffffff;
    --sidebar-text: #1e293b;
    --sidebar-hover: #f1f5f9;
    --sidebar-active: #e2e8f0;
    
    /* Accent colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    
    /* Shadows - Soft and elegant */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* ============================================
   🌙 DARK THEME - Sleek & Modern
   ============================================ */
[data-theme="dark"] {
    /* Background colors - Deep and immersive */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Text colors - Bright and clear */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-accent: #818cf8;
    
    /* Border colors */
    --border-color: #334155;
    --border-color-light: #475569;
    
    /* Navbar - Dark slate */
    --navbar-bg: #1e293b;
    --navbar-text: #f1f5f9;
    --navbar-border: #334155;
    
    /* Sidebar - Dark blue matching background */
    --sidebar-bg: #0f172a;
    --sidebar-text: #f1f5f9;
    --sidebar-hover: #1e293b;
    --sidebar-active: #334155;
    
    /* Accent colors - Brighter for dark mode */
    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --accent-success: #34d399;
    --accent-warning: #fbbf24;
    --accent-danger: #f87171;
    
    /* Shadows - Deeper and more dramatic */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(129, 140, 248, 0.4);
}

/* ============================================
   APPLY THEME TO ELEMENTS
   ============================================ */

/* Body */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Navbar */
#main-navbar {
    background-color: var(--navbar-bg) !important;
    border-bottom: 1px solid var(--navbar-border) !important;
    box-shadow: var(--shadow-md) !important;
    min-height: 64px !important;
}

#main-navbar .navbar-text,
#main-navbar span,
#main-navbar .nav-link {
    color: var(--navbar-text) !important;
}

#navbar-container {
    background-color: var(--navbar-bg) !important;
}

/* Sidebar - Beautiful gradient background */
.sidebar {
    background: var(--sidebar-bg) !important;
    color: var(--sidebar-text) !important;
    box-shadow: var(--shadow-lg) !important;
}

.sidebar .nav-link {
    color: var(--sidebar-text) !important;
    border-radius: 8px !important;
    margin: 4px 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sidebar .nav-link:hover {
    background-color: var(--sidebar-hover) !important;
    transform: translateX(5px) !important;
    box-shadow: var(--shadow-md) !important;
}

.sidebar .nav-link.active {
    background-color: var(--sidebar-active) !important;
    box-shadow: var(--shadow-glow) !important;
    font-weight: 600 !important;
}

/* Cards */
.card {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.card-header {
    background-color: var(--bg-tertiary) !important;
    border-bottom-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Tables */
.table {
    color: var(--text-primary) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--bg-secondary) !important;
}

/* Forms */
.form-control,
.form-select {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-primary) !important;
    border-color: #0d6efd !important;
    color: var(--text-primary) !important;
}

/* Modals */
.modal-content {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

.modal-header {
    border-bottom-color: var(--border-color) !important;
}

.modal-footer {
    border-top-color: var(--border-color) !important;
}

/* ============================================
   ✨ AWESOME ANIMATIONS & EFFECTS
   ============================================ */

/* Smooth theme transitions */
body,
.navbar,
.sidebar,
.card,
.form-control,
.modal-content {
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cards with hover effect */
.card {
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--shadow-lg) !important;
}

/* Buttons with fun effects */
.btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
}

.btn:active {
    transform: translateY(0) !important;
}

/* Theme toggle button - Make it fun! */
#theme-toggle {
    border-radius: 50px !important;
    padding: 10px 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
}

#theme-toggle:hover {
    transform: rotate(15deg) scale(1.1) !important;
    box-shadow: var(--shadow-glow) !important;
}

#theme-toggle:active {
    transform: rotate(0deg) scale(0.95) !important;
}

/* Fade in animation for page load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pulse animation for important elements */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

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

/* Glow effect for active elements */
.glow {
    box-shadow: var(--shadow-glow) !important;
}
