/* Modern Health & Fitness Tracker - CloudLearn Inspired Theme */

:root {
    /* Enhanced Modern Color Palette */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    
    --success-50: #f0fdf4;
    --success-100: #dcfce7;
    --success-200: #bbf7d0;
    --success-300: #86efac;
    --success-400: #4ade80;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;
    --success-800: #166534;
    --success-900: #14532d;
    
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;
    
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-300: #fdba74;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --orange-800: #9a3412;
    --orange-900: #7c2d12;
    
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-200: #fecaca;
    --red-300: #fca5a5;
    --red-400: #f87171;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --red-800: #991b1b;
    --red-900: #7f1d1d;
    
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-200: #e9d5ff;
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-700: #7c3aed;
    --purple-800: #6b21a8;
    --purple-900: #581c87;
    
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;
    
    /* Spacing & Layout */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Enhanced Animation Timing */
    --duration-instant: 100ms;
    --duration-fast: 200ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --duration-slower: 750ms;
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-back: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* DARK THEME (Default) */
:root, [data-theme="dark"] {
    /* Enhanced Gradient System */
    --gradient-primary: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 50%, var(--primary-700) 100%);
    --gradient-success: linear-gradient(135deg, var(--emerald-400) 0%, var(--emerald-500) 50%, var(--emerald-600) 100%);
    --gradient-warning: linear-gradient(135deg, var(--orange-400) 0%, var(--orange-500) 50%, var(--orange-600) 100%);
    --gradient-danger: linear-gradient(135deg, var(--red-400) 0%, var(--red-500) 50%, var(--red-600) 100%);
    --gradient-purple: linear-gradient(135deg, var(--purple-400) 0%, var(--purple-500) 50%, var(--purple-600) 100%);
    --gradient-dark: linear-gradient(135deg, var(--slate-700) 0%, var(--slate-800) 50%, var(--slate-900) 100%);
    --gradient-subtle: linear-gradient(135deg, var(--slate-200) 0%, var(--slate-300) 100%);
    
    /* Modern Mesh Gradients */
    --gradient-mesh-primary: radial-gradient(at 40% 20%, var(--primary-400) 0px, transparent 50%),
                             radial-gradient(at 80% 0%, var(--primary-600) 0px, transparent 50%),
                             radial-gradient(at 0% 50%, var(--emerald-400) 0px, transparent 50%),
                             radial-gradient(at 80% 50%, var(--purple-400) 0px, transparent 50%);
    
    --gradient-hero: linear-gradient(135deg, var(--primary-500) 0%, var(--emerald-400) 25%, var(--purple-500) 50%, var(--primary-600) 100%);
    
    /* Background System - Dark */
    --bg-primary: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-950) 100%);
    --bg-card: var(--bg-card-dark);
    --bg-card-light: rgba(255, 255, 255, 0.98);
    --bg-card-dark: rgba(30, 41, 59, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-dark: rgba(15, 23, 42, 0.8);
    
    /* Text Colors - Dark */
    --text-primary: var(--slate-50);
    --text-secondary: var(--slate-300);
    --text-muted: var(--slate-400);
    --text-light: var(--slate-100);
    --text-inverse: var(--slate-50);
    
    /* Border Colors - Dark */
    --border-primary: var(--slate-700);
    --border-secondary: var(--slate-600);
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-glass-strong: rgba(255, 255, 255, 0.2);
    
    /* Enhanced Shadow System - Dark */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    --shadow-3xl: 0 35px 60px -12px rgba(0, 0, 0, 0.35);
    
    /* Enhanced Glow Effects */
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3), 0 0 40px rgba(16, 185, 129, 0.1);
    --shadow-glow-primary: 0 0 20px rgba(14, 165, 233, 0.3), 0 0 40px rgba(14, 165, 233, 0.1);
    --shadow-glow-purple: 0 0 20px rgba(168, 85, 247, 0.3), 0 0 40px rgba(168, 85, 247, 0.1);
    --shadow-glow-orange: 0 0 20px rgba(249, 115, 22, 0.3), 0 0 40px rgba(249, 115, 22, 0.1);
    
    /* Modern Soft Shadows */
    --shadow-soft: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
    --shadow-soft-md: 0 4px 16px 0 rgba(0, 0, 0, 0.12);
    --shadow-soft-lg: 0 8px 24px 0 rgba(0, 0, 0, 0.15);
}

/* LIGHT THEME - Enhanced for Better Contrast */
[data-theme="light"] {
    /* Gradient System - Light */
    --gradient-primary: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --gradient-success: linear-gradient(135deg, var(--emerald-500) 0%, var(--emerald-600) 100%);
    --gradient-warning: linear-gradient(135deg, var(--orange-400) 0%, var(--orange-500) 100%);
    --gradient-danger: linear-gradient(135deg, var(--red-400) 0%, var(--red-500) 100%);
    --gradient-purple: linear-gradient(135deg, var(--purple-500) 0%, var(--purple-600) 100%);
    --gradient-dark: linear-gradient(135deg, var(--slate-700) 0%, var(--slate-800) 100%);
    --gradient-subtle: linear-gradient(135deg, var(--slate-100) 0%, var(--slate-200) 100%);
    
    /* Background System - Light (Much Better Contrast) */
    --bg-primary: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-light: rgba(255, 255, 255, 0.95);
    --bg-card-dark: rgba(248, 250, 252, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.6);
    --bg-glass-dark: rgba(248, 250, 252, 0.8);
    
    /* Text Colors - Light (High Contrast) */
    --text-primary: var(--slate-900);
    --text-secondary: var(--slate-700);
    --text-muted: var(--slate-600);
    --text-light: var(--slate-800);
    --text-inverse: var(--slate-900);
    
    /* Border Colors - Light (More Visible) */
    --border-primary: var(--slate-300);
    --border-secondary: var(--slate-400);
    --border-glass: rgba(15, 23, 42, 0.15);
    --border-glass-strong: rgba(15, 23, 42, 0.25);
    
    /* Shadows - Light (More Pronounced) */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.3);
    --shadow-glow-primary: 0 0 25px rgba(6, 182, 212, 0.3);
}

/* Optimized Global Transitions */
* {
    transition-duration: 0s; /* Disable by default for performance */
}

/* Selective transitions for interactive elements */
.btn, 
.card, 
.form-control, 
.form-select,
.nav-link,
.dropdown-item,
.alert,
.badge,
.progress-bar,
.icon-circle,
.feature-card {
    transition: all var(--duration-fast) var(--ease-out);
}

/* Smooth hover transitions */
.btn:hover,
.card:hover,
.feature-card:hover,
.nav-link:hover {
    transition-duration: var(--duration-normal);
    transition-timing-function: var(--ease-spring);
}

/* Enhanced Theme Transition System */
html {
    transition: none;
}

html.theme-transitioning {
    transition: none;
}

html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition: 
        background-color 0.4s ease,
        background 0.4s ease,
        color 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease !important;
    animation-duration: 0.4s !important;
}

/* Smooth theme transitions for specific properties */
body,
.navbar,
.card,
.feature-card,
.btn,
.form-control,
.form-select,
.alert,
.dropdown-menu,
h1, h2, h3, h4, h5, h6,
p, span, div, small {
    transition: 
        background var(--duration-slow) var(--ease-out),
        background-color var(--duration-slow) var(--ease-out),
        color var(--duration-slow) var(--ease-out),
        border-color var(--duration-slow) var(--ease-out),
        box-shadow var(--duration-slow) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
}

body {
    background: var(--bg-primary);
    color: var(--text-inverse);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Animated Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
}

/* Floating Particles Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, var(--emerald-400), transparent),
        radial-gradient(2px 2px at 40% 70%, var(--primary-400), transparent),
        radial-gradient(1px 1px at 60% 10%, var(--purple-400), transparent),
        radial-gradient(1px 1px at 80% 50%, var(--orange-400), transparent),
        radial-gradient(2px 2px at 90% 90%, var(--emerald-500), transparent);
    background-repeat: repeat;
    background-size: 300px 300px;
    animation: float-particles 20s linear infinite;
    pointer-events: none;
    z-index: -1;
    transition: opacity var(--duration-slow) var(--ease-out);
}

[data-theme="dark"] body::after {
    opacity: 0.4;
}

[data-theme="light"] body::after {
    opacity: 0.15;
}

@keyframes float-particles {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

/* Enhanced Navigation System */
.navbar {
    backdrop-filter: blur(30px);
    background: var(--bg-glass-dark) !important;
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-soft-lg);
    transition: all var(--duration-fast) var(--ease-out);
}

.navbar.scrolled {
    padding: 0.75rem 0;
    backdrop-filter: blur(40px);
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.875rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.4));
    letter-spacing: -0.025em;
    transition: all var(--duration-normal) var(--ease-spring);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.navbar-brand:hover {
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.8));
    transform: scale(1.05);
    background-size: 200% 200%;
    animation: gradient-shift 2s ease infinite;
}

.navbar-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left var(--duration-slow) var(--ease-out);
}

.navbar-brand:hover::before {
    left: 100%;
}

.navbar-nav .nav-link {
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-xl);
    margin: 0 0.375rem;
    position: relative;
    overflow: hidden;
    color: var(--text-light);
    transition: all var(--duration-normal) var(--ease-out);
    backdrop-filter: blur(8px);
    border: 1px solid transparent;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-success);
    transition: left var(--duration-slow) var(--ease-out);
    z-index: -1;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-glass);
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    z-index: -2;
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    left: 0;
}

.navbar-nav .nav-link:hover::after {
    opacity: 1;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--text-inverse) !important;
    transform: translateY(-2px);
    border-color: var(--border-glass-strong);
    box-shadow: var(--shadow-glow);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-glass-dark);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-full);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-right: 1rem;
    backdrop-filter: blur(16px);
    transition: all var(--duration-normal) var(--ease-out);
}

.theme-toggle:hover {
    border-color: var(--border-glass-strong);
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

.theme-toggle .theme-icon-light,
.theme-toggle .theme-icon-dark {
    position: absolute;
    font-size: 1.125rem;
    transition: all var(--duration-normal) var(--ease-out);
    color: var(--emerald-400);
}

/* Theme icon visibility logic */
[data-theme="dark"] .theme-icon-light {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-icon-dark {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

[data-theme="light"] .theme-icon-light {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

[data-theme="light"] .theme-icon-dark {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Default to dark theme icons */
:root .theme-icon-light {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

:root .theme-icon-dark {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

/* Modern Card System */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-soft-lg);
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
    transition: all var(--duration-fast) var(--ease-out);
    transform: translateY(0);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-hero);
    opacity: 0;
    transition: all var(--duration-normal) var(--ease-spring);
    transform: scaleX(0);
    transform-origin: left;
}

.card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02), transparent 70%);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--border-glass-strong);
}

.card:hover::after {
    opacity: 1;
}

.card-header {
    background: var(--bg-glass-dark);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0 !important;
    font-weight: 700;
    padding: 1.75rem 2rem;
    color: var(--text-inverse);
    position: relative;
    font-size: 1.125rem;
}

.card-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-success);
    opacity: 0.5;
}

.card-body {
    padding: 2rem;
    color: var(--text-inverse);
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.card-body p:last-child {
    margin-bottom: 0;
}

/* Card footer enhancement */
.card-footer {
    background: var(--bg-glass-dark);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    padding: 1.5rem 2rem;
    color: var(--text-light);
}

/* Modern Button System */
.btn {
    border-radius: var(--radius-xl);
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: -0.01em;
    font-size: 0.9375rem;
    transition: all var(--duration-fast) var(--ease-out);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    line-height: 1.2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    transform: translateY(0);
    user-select: none;
    -webkit-user-select: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--duration-slow) var(--ease-out);
    z-index: 1;
    border-radius: inherit;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent, rgba(255, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: translateY(-1px) scale(0.99);
    transition-duration: var(--duration-instant);
}

.btn:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.5);
    outline-offset: 2px;
}

/* Enhanced Button Variants */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-600);
    box-shadow: var(--shadow-soft-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 50%, var(--primary-600) 100%);
    box-shadow: var(--shadow-glow-primary), var(--shadow-lg);
    border-color: var(--primary-500);
    color: white;
}

.btn-primary:active {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 50%, var(--primary-800) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), var(--shadow-soft);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    border-color: var(--emerald-600);
    box-shadow: var(--shadow-soft-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--emerald-300) 0%, var(--emerald-400) 50%, var(--emerald-500) 100%);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    border-color: var(--emerald-500);
    color: white;
}

.btn-success:active {
    background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald-700) 50%, var(--emerald-800) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), var(--shadow-soft);
}

.btn-warning {
    background: var(--gradient-warning);
    color: white;
    border-color: var(--orange-600);
    box-shadow: var(--shadow-soft-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--orange-300) 0%, var(--orange-400) 50%, var(--orange-500) 100%);
    box-shadow: var(--shadow-glow-orange), var(--shadow-lg);
    border-color: var(--orange-500);
    color: white;
}

.btn-warning:active {
    background: linear-gradient(135deg, var(--orange-600) 0%, var(--orange-700) 50%, var(--orange-800) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), var(--shadow-soft);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    border-color: var(--red-600);
    box-shadow: var(--shadow-soft-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--red-300) 0%, var(--red-400) 50%, var(--red-500) 100%);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3), var(--shadow-lg);
    border-color: var(--red-500);
    color: white;
}

.btn-danger:active {
    background: linear-gradient(135deg, var(--red-600) 0%, var(--red-700) 50%, var(--red-800) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), var(--shadow-soft);
}

.btn-info {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-600);
    box-shadow: var(--shadow-soft-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-info:hover {
    background: linear-gradient(135deg, var(--primary-300) 0%, var(--primary-400) 50%, var(--primary-500) 100%);
    box-shadow: var(--shadow-glow-primary), var(--shadow-lg);
    border-color: var(--primary-500);
    color: white;
}

.btn-info:active {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 50%, var(--primary-800) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), var(--shadow-soft);
}

.btn-light {
    background: rgba(255, 255, 255, 0.9);
    color: var(--slate-700);
    border-color: var(--slate-300);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
}

.btn-light:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--slate-400);
    color: var(--slate-800);
    box-shadow: var(--shadow-soft-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn-light:active {
    background: rgba(248, 250, 252, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05), var(--shadow-soft);
}

/* Dark theme light button adjustments */
[data-theme="dark"] .btn-light {
    background: rgba(51, 65, 85, 0.8);
    color: var(--slate-200);
    border-color: var(--slate-600);
}

[data-theme="dark"] .btn-light:hover {
    background: rgba(71, 85, 105, 0.9);
    color: var(--slate-100);
    border-color: var(--slate-500);
}

[data-theme="dark"] .btn-light:active {
    background: rgba(30, 41, 59, 0.9);
}

/* Enhanced Button Sizes */
.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    gap: 0.375rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    font-weight: 700;
    border-radius: var(--radius-2xl);
    gap: 0.625rem;
}

.btn-xs {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    gap: 0.25rem;
}

/* Enhanced Button States */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    transform: none !important;
    box-shadow: var(--shadow-sm) !important;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(20%);
}

.btn:disabled::before,
.btn.disabled::before {
    display: none;
}

/* Loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Outline button variants */
.btn-outline-primary {
    background: transparent;
    color: var(--primary-500);
    border-color: var(--primary-500);
    backdrop-filter: blur(10px);
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-600);
    box-shadow: var(--shadow-glow-primary), var(--shadow-md);
}

.btn-outline-success {
    background: transparent;
    color: var(--emerald-500);
    border-color: var(--emerald-500);
    backdrop-filter: blur(10px);
}

.btn-outline-success:hover {
    background: var(--gradient-success);
    color: white;
    border-color: var(--emerald-600);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

/* Enhanced Form Styles */
.form-control, .form-select {
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-glass);
    background: var(--bg-glass-dark);
    backdrop-filter: blur(16px);
    color: var(--text-inverse);
    padding: 0.875rem 1.25rem;
    transition: all var(--duration-fast) var(--ease-out);
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: var(--shadow-soft);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12), var(--shadow-soft-md);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
    transform: translateY(-1px);
    outline: none;
}

.form-control:hover:not(:focus), .form-select:hover:not(:focus) {
    border-color: var(--border-glass-strong);
    box-shadow: var(--shadow-soft-md);
}

/* Form validation states */
.form-control.is-valid {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.form-control.is-invalid {
    border-color: var(--red-500);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-control::placeholder {
    color: var(--slate-400);
    font-weight: 400;
    opacity: 0.8;
}

.form-select option {
    background: var(--slate-800);
    color: var(--text-inverse);
    padding: 0.5rem;
}

/* Floating labels enhancement */
.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: var(--primary-500);
    font-weight: 600;
}

.form-floating label {
    transition: all var(--duration-fast) var(--ease-out);
    font-weight: 500;
    opacity: 0.8;
}

/* Input group enhancements */
.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
    z-index: 3;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    z-index: 2;
}

.input-group .form-control:focus {
    z-index: 4;
}

/* Enhanced Alert Styles */
.alert {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft-md);
    background: var(--bg-card-dark);
    position: relative;
    overflow: hidden;
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0.3;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--emerald-400);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--red-400);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--orange-400);
}

.alert-info {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    color: var(--primary-400);
}

.alert-primary {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    color: var(--primary-400);
}

/* Background Gradient Utilities */
.bg-primary {
    background: var(--primary-gradient) !important;
}

.bg-success {
    background: var(--success-gradient) !important;
}

.bg-info {
    background: var(--gradient-primary) !important;
}

.bg-info-soft {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(8, 145, 178, 0.1) 100%) !important;
}

.bg-warning {
    background: var(--warning-gradient) !important;
}

.bg-danger {
    background: var(--danger-gradient) !important;
}

/* Enhanced Progress & Data Visualization */
.progress {
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-glass);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), var(--shadow-soft);
    transition: all var(--duration-fast) var(--ease-out);
}

.progress:hover {
    transform: scale(1.02);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.12), var(--shadow-soft-md);
}

.progress-bar {
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-spring);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    animation: shimmer 3s ease-in-out infinite;
    z-index: 1;
    opacity: 0.8;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.25), 
        transparent);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
    z-index: 0;
}

@keyframes shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Enhanced Progress Bar Variants */
.progress-bar-success {
    background: var(--gradient-success);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--shadow-glow);
    position: relative;
}

.progress-bar-success:hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), var(--shadow-glow), var(--shadow-soft-md);
}

.progress-bar-warning {
    background: var(--gradient-warning);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--shadow-glow-orange);
}

.progress-bar-warning:hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), var(--shadow-glow-orange), var(--shadow-soft-md);
}

.progress-bar-danger {
    background: var(--gradient-danger);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 20px rgba(248, 113, 113, 0.3);
}

.progress-bar-danger:hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 25px rgba(248, 113, 113, 0.4), var(--shadow-soft-md);
}

.progress-bar-primary {
    background: var(--gradient-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--shadow-glow-primary);
}

.progress-bar-primary:hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), var(--shadow-glow-primary), var(--shadow-soft-md);
}

/* Circular Progress */
.circular-progress {
    position: relative;
    width: 120px;
    height: 120px;
}

.circular-progress svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.circular-progress circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray var(--duration-slow) var(--ease-out);
}

.circular-progress .bg-circle {
    stroke: var(--slate-200);
    opacity: 0.3;
}

.circular-progress .progress-circle {
    stroke: url(#gradient-success);
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.3));
}

.circular-progress-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-inverse);
}

/* Enhanced Data Cards */
.data-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    text-align: center;
    transition: all var(--duration-fast) var(--ease-spring);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    box-shadow: var(--shadow-soft-md);
}

.data-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-hero);
    transform: scaleX(0);
    transition: transform var(--duration-normal) var(--ease-spring);
    transform-origin: left;
}

.data-card:hover::before {
    transform: scaleX(1);
}

.data-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-glass-strong);
}

.data-card * {
    color: var(--text-inverse);
}

.data-card-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.75rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    transition: all var(--duration-normal) var(--ease-out);
}

.data-card:hover .data-card-value {
    transform: scale(1.05);
}

.data-card-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.075em;
    opacity: 0.8;
    transition: all var(--duration-fast) var(--ease-out);
}

.data-card:hover .data-card-label {
    opacity: 1;
    color: var(--text-inverse);
}

/* Spinner & Loading */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
    border-color: #10b981;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Icons & Typography */
.card .fa-3x, .card .fa-2x {
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

pre {
    font-size: 0.9rem;
    line-height: 1.4;
    background: var(--bg-card-dark) !important;
    border: 1px solid var(--border-glass);
    color: var(--text-inverse);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(16px);
}

/* Footer */
footer {
    margin-top: auto;
    background: var(--bg-glass-dark) !important;
    backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-glass);
}

footer * {
    color: var(--text-light) !important;
}

.text-muted {
    color: var(--slate-400) !important;
}

footer .text-muted {
    color: var(--slate-300) !important;
}

.border-bottom {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Enhanced Dashboard Feature Cards */
.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-2xl);
    transition: all var(--duration-normal) var(--ease-spring);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft-lg);
    cursor: pointer;
    transform: translateY(0) scale(1);
    transform-origin: center;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-mesh-primary);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    filter: blur(40px);
    transform: scale(1.1);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left var(--duration-slow) var(--ease-out);
    z-index: 1;
}

.feature-card:hover::before {
    opacity: 0.6;
}

.feature-card:hover::after {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-3xl);
    border-color: var(--border-glass-strong);
}

/* Feature card active state */
.feature-card:active {
    transform: translateY(-4px) scale(1.01);
    transition-duration: var(--duration-instant);
}

.feature-card .card-body {
    position: relative;
    z-index: 2;
    padding: 2rem 1.75rem;
    color: var(--text-inverse);
    text-align: center;
}

.feature-card h5 {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1.3;
}

.feature-card p {
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.feature-card .btn {
    margin-top: auto;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all var(--duration-fast) var(--ease-spring);
}

.feature-card .btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Animated Gradients */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background: linear-gradient(-45deg, #667eea, #764ba2, #10b981, #059669);
    background-size: 400% 400%;
    animation: gradient-shift 8s ease infinite;
}

/* Hover Effects */
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

/* Enhanced Mobile-First Responsive Design */

/* Mobile-first optimizations for better content density */
@media (max-width: 768px) {
    /* Reduce excessive vertical spacing on mobile */
    .row {
        margin-bottom: 1rem !important;
    }
    
    .mb-4, .my-4 {
        margin-bottom: 1rem !important;
    }
    
    .mb-5, .my-5 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Compact dashboard layout */
    .welcome-hero {
        padding: 15px 0 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Optimize card spacing and layout */
    .card {
        margin-bottom: 1rem !important;
        border-radius: 12px !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-header {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Feature cards mobile optimization */
    .feature-card {
        margin-bottom: 0.75rem !important;
    }
    
    .feature-card .card-body {
        padding: 1rem !important;
        text-align: center;
    }
    
    .feature-card .icon-circle {
        width: 40px !important;
        height: 40px !important;
        margin: 0 auto 0.5rem auto !important;
    }
    
    .feature-card h5 {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .feature-card p {
        font-size: 0.85rem !important;
        margin-bottom: 0 !important;
    }
    
    /* Mobile form optimizations */
    .form-control {
        padding: 0.75rem 1rem !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    textarea.form-control {
        min-height: 80px !important;
        resize: vertical;
    }
    
    /* Mobile button optimizations */
    .btn {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.9rem !important;
        min-height: 44px !important; /* Touch-friendly */
        border-radius: 8px !important;
    }
    
    .btn-sm {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
        min-height: 36px !important;
    }
    
    /* Mobile navigation */
    .navbar {
        padding: 0.5rem 0 !important;
    }
    
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    /* Mobile speech recognition */
    #speechBtn {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0.75rem !important;
    }
    
    .input-group textarea {
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
    
    /* Mobile tables and data */
    .table-responsive {
        font-size: 0.85rem !important;
    }
    
    /* Mobile progress bars */
    .progress {
        height: 12px !important;
        border-radius: 6px !important;
    }
    
    /* Mobile badges and labels */
    .badge {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Mobile modal optimization */
    .modal-dialog {
        margin: 0.5rem !important;
    }
    
    .modal-content {
        border-radius: 12px !important;
    }
    
    /* Reduce animation complexity on mobile */
    .card:hover {
        transform: none !important;
    }
    
    .feature-card:hover {
        transform: translateY(-2px) !important;
    }
    
    /* Mobile grid improvements */
    .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .col-lg-3, .col-lg-4, .col-lg-6 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    /* Extra small mobile devices */
    .container-fluid, .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Ultra-compact layout */
    .welcome-hero {
        padding: 10px 0 !important;
    }
    
    .welcome-back-text {
        font-size: 1.3rem !important;
    }
    
    .username-display {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }
    
    .welcome-subtitle {
        font-size: 0.85rem !important;
    }
    
    /* Compact cards for very small screens */
    .card-body {
        padding: 0.75rem !important;
    }
    
    .card-header {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Feature cards ultra-compact */
    .feature-card .card-body {
        padding: 0.75rem !important;
    }
    
    .feature-card .icon-circle {
        width: 35px !important;
        height: 35px !important;
    }
    
    .feature-card h5 {
        font-size: 0.9rem !important;
    }
    
    .feature-card p {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    /* Ultra-compact buttons */
    .btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
    }
    
    /* Compact forms */
    .form-control {
        padding: 0.6rem 0.8rem !important;
    }
    
    textarea.form-control {
        min-height: 70px !important;
    }
    
    /* Speech recognition mobile adjustments */
    .input-group {
        display: flex !important;
        width: 100% !important;
    }
    
    .input-group textarea {
        flex: 1 !important;
    }
    
    #speechBtn {
        min-width: 40px !important;
        padding: 0.6rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Mobile typography adjustments */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.1rem !important; }
    h4 { font-size: 1rem !important; }
    h5 { font-size: 0.9rem !important; }
    h6 { font-size: 0.85rem !important; }
    
    /* Reduce vertical spacing even more */
    .mb-3 { margin-bottom: 0.75rem !important; }
    .mb-4 { margin-bottom: 1rem !important; }
    .mb-5 { margin-bottom: 1.25rem !important; }
    
    .mt-3 { margin-top: 0.75rem !important; }
    .mt-4 { margin-top: 1rem !important; }
    .mt-5 { margin-top: 1.25rem !important; }
    
    /* Mobile-specific layout adjustments */
    .row {
        margin-bottom: 0.75rem !important;
    }
    
    /* Optimize touch targets */
    .nav-link {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }
}

/* Landscape phone orientation */
@media (max-width: 812px) and (orientation: landscape) {
    .welcome-hero {
        padding: 8px 0 !important;
    }
    
    .card {
        margin-bottom: 0.5rem !important;
    }
    
    .feature-card .card-body {
        padding: 0.75rem !important;
    }
}

/* Large mobile / small tablet optimization */
@media (min-width: 576px) and (max-width: 768px) {
    .container {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Two-column layout for feature cards on larger mobiles */
    .col-lg-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .feature-card {
        height: 100% !important;
        margin-bottom: 1rem !important;
    }
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .feature-card .card-body {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 992px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .feature-card .icon-circle {
        width: 60px !important;
        height: 60px !important;
    }
    
    .feature-card .icon-circle i {
        font-size: 1.5rem !important;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
    }
    
    .feature-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .feature-card h5 {
        font-size: 1.1rem;
    }
    
    .feature-card .icon-circle {
        width: 50px !important;
        height: 50px !important;
    }
    
    .feature-card .icon-circle i {
        font-size: 1.25rem !important;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .progress {
        height: 16px;
    }
    
    .badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Mobile navigation improvements */
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Mobile-specific card layouts */
    .row.g-4 {
        gap: 1rem !important;
    }
    
    .col-lg-3.col-md-6 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .feature-card .card-body {
        padding: 1.25rem 0.75rem;
        text-align: center;
    }
    
    .feature-card h5 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-card p {
        font-size: 0.825rem;
        margin-bottom: 1rem;
    }
    
    .feature-card .icon-circle {
        width: 45px !important;
        height: 45px !important;
        margin-bottom: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .progress {
        height: 14px;
    }
    
    .progress-bar {
        font-size: 0.7rem;
    }
    
    /* Simplified mobile layout */
    .d-md-flex {
        display: block !important;
    }
    
    .justify-content-between {
        flex-direction: column !important;
        gap: 0.5rem;
    }
    
    .text-md-end {
        text-align: center !important;
    }
    
    .text-md-start {
        text-align: center !important;
    }
    
    /* Mobile footer */
    footer .row {
        text-align: center;
    }
    
    footer .col-md-6 {
        margin-bottom: 0.5rem;
    }
}

/* Bootstrap Component Overrides for Dark Theme */
.table {
    color: var(--text-inverse);
    background: var(--bg-card);
}

.table thead th {
    border-bottom: 2px solid var(--border-glass);
    color: var(--text-inverse);
}

.table td, .table th {
    border-top: 1px solid var(--border-glass);
}

.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
    background: rgba(255, 255, 255, 0.02);
}

.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
    background: rgba(255, 255, 255, 0.05);
}

/* Modal Overrides */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-2xl);
    backdrop-filter: blur(24px);
    color: var(--text-inverse);
}

.modal-header {
    border-bottom: 1px solid var(--border-glass);
    background: var(--bg-glass-dark);
}

.modal-footer {
    border-top: 1px solid var(--border-glass);
    background: var(--bg-glass-dark);
}

.modal-title {
    color: var(--text-inverse);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* List Group Overrides */
.list-group-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-light);
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.list-group-item.active {
    background: var(--gradient-success);
    border-color: var(--emerald-500);
    color: var(--text-inverse);
}

/* Input Group Overrides */
.input-group-text {
    background: var(--bg-glass-dark);
    border: 2px solid var(--border-glass);
    color: var(--text-light);
}

/* Global Text Contrast Fixes */
.card .text-muted {
    color: var(--slate-300) !important;
}

.feature-card .text-muted {
    color: var(--slate-300) !important;
}

/* Ensure all small text is visible */
small {
    color: var(--slate-300);
}

.card small,
.feature-card small {
    color: var(--slate-300) !important;
}

/* Fix any remaining white text on white background */
.bg-light {
    background: var(--bg-card-dark) !important;
    color: var(--text-inverse) !important;
}

.text-dark {
    color: var(--text-inverse) !important;
}

/* Theme-specific text color adjustments */
[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3, 
[data-theme="light"] h4, 
[data-theme="light"] h5, 
[data-theme="light"] h6 {
    color: var(--text-primary);
}

[data-theme="light"] .card h1, 
[data-theme="light"] .card h2, 
[data-theme="light"] .card h3, 
[data-theme="light"] .card h4, 
[data-theme="light"] .card h5, 
[data-theme="light"] .card h6,
[data-theme="light"] .feature-card h1, 
[data-theme="light"] .feature-card h2, 
[data-theme="light"] .feature-card h3, 
[data-theme="light"] .feature-card h4, 
[data-theme="light"] .feature-card h5, 
[data-theme="light"] .feature-card h6 {
    color: var(--text-primary);
}

[data-theme="light"] .card p, 
[data-theme="light"] .card span, 
[data-theme="light"] .card div, 
[data-theme="light"] .card small,
[data-theme="light"] .feature-card p, 
[data-theme="light"] .feature-card span, 
[data-theme="light"] .feature-card div, 
[data-theme="light"] .feature-card small {
    color: var(--text-secondary);
}

[data-theme="light"] .card-body {
    color: var(--text-primary);
}

[data-theme="light"] .feature-card .card-body {
    color: var(--text-primary);
}

/* Light Theme Navigation Fixes */
[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--slate-300);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .navbar-brand {
    color: var(--slate-900) !important;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
}

[data-theme="light"] .navbar-nav .nav-link {
    color: var(--slate-700) !important;
    background: rgba(248, 250, 252, 0.6);
    border: 1px solid var(--slate-200);
}

[data-theme="light"] .navbar-nav .nav-link:hover,
[data-theme="light"] .navbar-nav .nav-link.active {
    color: var(--slate-900) !important;
    background: var(--gradient-success);
    color: white !important;
    border-color: var(--emerald-500);
}

[data-theme="light"] .theme-toggle {
    background: rgba(248, 250, 252, 0.8);
    border: 2px solid var(--slate-300);
}

[data-theme="light"] .theme-toggle:hover {
    border-color: var(--slate-400);
    background: rgba(248, 250, 252, 1);
}

/* Light Theme Dropdown Fixes */
[data-theme="light"] .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--slate-300);
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .dropdown-item {
    color: var(--slate-800);
}

[data-theme="light"] .dropdown-item:hover {
    background: var(--gradient-success);
    color: white;
}

/* Light Theme Card Enhancements */
[data-theme="light"] .card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .card-header {
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid var(--slate-300);
    color: var(--slate-900);
}

[data-theme="light"] .feature-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--slate-200);
}

[data-theme="light"] .feature-card:hover {
    border-color: var(--slate-300);
    box-shadow: var(--shadow-xl);
}

/* Light Theme Progress Bar Fixes */
[data-theme="light"] .progress {
    background: rgba(226, 232, 240, 0.6);
    border: 1px solid var(--slate-300);
}

/* Light Theme Form Fixes */
[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--slate-300);
    color: var(--slate-900);
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus {
    border-color: var(--emerald-500);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

[data-theme="light"] .form-control::placeholder {
    color: var(--slate-500);
}

/* Light Theme Alert Fixes */
[data-theme="light"] .alert {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--slate-300);
}

[data-theme="light"] .alert-success {
    background: rgba(240, 253, 244, 0.9);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--emerald-800);
}

[data-theme="light"] .alert-danger {
    background: rgba(254, 242, 242, 0.9);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--red-800);
}

[data-theme="light"] .alert-warning {
    background: rgba(255, 247, 237, 0.9);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--orange-800);
}

[data-theme="light"] .alert-info {
    background: rgba(240, 249, 255, 0.9);
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--primary-800);
}

/* Light Theme Footer Fix */
[data-theme="light"] footer {
    background: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid var(--slate-300);
}

[data-theme="light"] footer * {
    color: var(--slate-700) !important;
}

[data-theme="light"] footer .text-muted {
    color: var(--slate-600) !important;
}

/* Light Theme Text Color Fixes - Dashboard and Cards */
[data-theme="light"] .text-white,
[data-theme="light"] .card-header.bg-primary .text-white,
[data-theme="light"] .card-header.bg-success .text-white,
[data-theme="light"] .card-header.bg-info .text-white,
[data-theme="light"] .card-header.bg-warning .text-white,
[data-theme="light"] .card-header.bg-danger .text-white,
[data-theme="light"] .card-header.bg-secondary .text-white {
    color: var(--slate-50) !important;
}

/* Fix specific card headers with Bootstrap bg-* classes */
[data-theme="light"] .card-header.bg-primary h5,
[data-theme="light"] .card-header.bg-primary h6,
[data-theme="light"] .card-header.bg-success h5,
[data-theme="light"] .card-header.bg-success h6,
[data-theme="light"] .card-header.bg-info h5,
[data-theme="light"] .card-header.bg-info h6,
[data-theme="light"] .card-header.bg-warning h5,
[data-theme="light"] .card-header.bg-warning h6,
[data-theme="light"] .card-header.bg-danger h5,
[data-theme="light"] .card-header.bg-danger h6,
[data-theme="light"] .card-header.bg-secondary h5,
[data-theme="light"] .card-header.bg-secondary h6 {
    color: white !important;
}

/* Specific Dashboard Fixes for Light Theme */
[data-theme="light"] .card-header.bg-gradient h5,
[data-theme="light"] .card-header[style*="background: linear-gradient"] h5,
[data-theme="light"] .card-header[style*="linear-gradient"] .text-white {
    color: var(--slate-900) !important;
    text-shadow: none;
}

/* Feature card icons should remain white in light theme for proper contrast */
[data-theme="light"] .feature-card .icon-circle .text-white {
    color: white !important;
}

/* Progress tab card headers */
[data-theme="light"] .card-header.bg-primary,
[data-theme="light"] .card-header.bg-success,
[data-theme="light"] .card-header.bg-info,
[data-theme="light"] .card-header.bg-warning,
[data-theme="light"] .card-header.bg-danger,
[data-theme="light"] .card-header.bg-secondary {
    color: white !important;
}

[data-theme="light"] .card-header.bg-primary *,
[data-theme="light"] .card-header.bg-success *,
[data-theme="light"] .card-header.bg-info *,
[data-theme="light"] .card-header.bg-warning *,
[data-theme="light"] .card-header.bg-danger *,
[data-theme="light"] .card-header.bg-secondary * {
    color: white !important;
}

/* CloudLearn-style Welcome Hero Section */
.welcome-hero {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.welcome-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(16, 185, 129, 0.05) 50%, 
        rgba(139, 92, 246, 0.05) 100%);
    pointer-events: none;
}

.welcome-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 30px;
}

.welcome-greeting {
    max-width: 800px;
    margin: 0 auto;
}

.welcome-back-text {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 0;
    letter-spacing: -0.02em;
}

.username-display {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 50%, #2563eb 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #3b82f6; /* Fallback color */
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    line-height: 1.1;
    display: inline-block;
    position: relative;
    animation: gradient-shift 4s ease-in-out infinite;
}

/* Gradient animation for extra visual appeal */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Alternative approach if text gradient fails */
.username-display::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 1;
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 0;
    opacity: 0.8;
}

/* Dark Theme Adjustments */
[data-theme="dark"] .welcome-hero::before {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(16, 185, 129, 0.08) 50%, 
        rgba(139, 92, 246, 0.08) 100%);
}

[data-theme="dark"] .username-display {
    background: linear-gradient(135deg, #60a5fa 0%, #34d399 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Light Theme Adjustments */
[data-theme="light"] .welcome-hero::before {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.03) 0%, 
        rgba(16, 185, 129, 0.03) 50%, 
        rgba(139, 92, 246, 0.03) 100%);
}

[data-theme="light"] .username-display {
    background: linear-gradient(135deg, #2563eb 0%, #059669 50%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-back-text {
        font-size: 1.8rem;
    }
    
    .username-display {
        font-size: 2.8rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }
    
    .welcome-content {
        padding: 0 20px;
    }
    
    .welcome-hero {
        padding: 30px 0;
    }
}

@media (max-width: 576px) {
    .welcome-back-text {
        font-size: 1.5rem;
    }
    
    .username-display {
        font-size: 2.2rem;
    }
    
    .welcome-hero {
        padding: 25px 0;
    }
}

/* Enhanced Progress Tab Styling for Both Themes */

/* Clean table styling for both themes */
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
    background: rgba(30, 41, 59, 0.5);
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) > td {
    background: rgba(15, 23, 42, 0.5);
}

[data-theme="light"] .table-striped > tbody > tr:nth-of-type(odd) > td {
    background: rgba(248, 250, 252, 0.8);
}

[data-theme="light"] .table-striped > tbody > tr:nth-of-type(even) > td {
    background: rgba(241, 245, 249, 0.8);
}

/* Remove table-primary special styling - use normal row background */
[data-theme="dark"] .table-primary,
[data-theme="light"] .table-primary {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    animation: none !important;
}

[data-theme="dark"] .table-primary td,
[data-theme="light"] .table-primary td {
    background: inherit !important;
    border-color: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
}

/* Today indicator styling */
.today-indicator {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    animation: subtle-glow 2s ease-in-out infinite alternate;
}

[data-theme="light"] .today-indicator {
    background: linear-gradient(135deg, #2563eb, #059669);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

@keyframes subtle-glow {
    0% {
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }
    100% {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
    }
}

/* Enhanced Badge Styling for Progress Tab */
[data-theme="dark"] .badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600)) !important;
    color: white;
    font-weight: 600;
    padding: 0.5em 0.8em;
    border-radius: 20px;
}

[data-theme="light"] .badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700)) !important;
    color: white;
    font-weight: 600;
    padding: 0.5em 0.8em;
    border-radius: 20px;
}

/* Progress Tab Table Enhancements */
[data-theme="dark"] .table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .table thead th {
    background: linear-gradient(135deg, var(--slate-700), var(--slate-800));
    color: var(--slate-50);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-500);
    padding: 15px 12px;
}

[data-theme="light"] .table thead th {
    background: linear-gradient(135deg, var(--slate-100), var(--slate-200));
    color: var(--slate-800);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-500);
    padding: 15px 12px;
}


/* Light Theme Text and Button Improvements */
[data-theme="light"] .btn {
    border: 1px solid var(--slate-300);
    font-weight: 700;
}

[data-theme="light"] .btn-light {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--slate-300);
    color: var(--slate-900);
}

[data-theme="light"] .btn-light:hover {
    background: rgba(248, 250, 252, 1);
    border-color: var(--slate-400);
    color: var(--slate-900);
}

[data-theme="light"] .badge {
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Light Theme Progress Text Fix */
[data-theme="light"] .progress-bar {
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Light Theme Bootstrap Component Fixes */
[data-theme="light"] .table {
    color: var(--slate-900);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .table thead th {
    border-bottom: 2px solid var(--slate-300);
    color: var(--slate-900);
    background: rgba(248, 250, 252, 0.8);
}

[data-theme="light"] .table td, 
[data-theme="light"] .table th {
    border-top: 1px solid var(--slate-200);
}

[data-theme="light"] .table-striped > tbody > tr:nth-of-type(odd) > td,
[data-theme="light"] .table-striped > tbody > tr:nth-of-type(odd) > th {
    background: rgba(248, 250, 252, 0.5);
}

[data-theme="light"] .table-hover > tbody > tr:hover > td,
[data-theme="light"] .table-hover > tbody > tr:hover > th {
    background: rgba(241, 245, 249, 0.7);
}

/* Light Theme Modal Fixes */
[data-theme="light"] .modal-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--slate-300);
    color: var(--slate-900);
}

[data-theme="light"] .modal-header {
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid var(--slate-300);
}

[data-theme="light"] .modal-footer {
    background: rgba(248, 250, 252, 0.8);
    border-top: 1px solid var(--slate-300);
}

[data-theme="light"] .modal-title {
    color: var(--slate-900);
}

[data-theme="light"] .btn-close {
    filter: none;
    opacity: 0.7;
}

/* Light Theme List Group Fixes */
[data-theme="light"] .list-group-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--slate-200);
    color: var(--slate-800);
}

[data-theme="light"] .list-group-item:hover {
    background: rgba(248, 250, 252, 0.9);
}

[data-theme="light"] .list-group-item.active {
    background: var(--gradient-success);
    border-color: var(--emerald-500);
    color: white;
}

/* Light Theme Pre/Code Block Fixes */
[data-theme="light"] pre {
    background: rgba(248, 250, 252, 0.9) !important;
    border: 1px solid var(--slate-300);
    color: var(--slate-900);
}

/* Light Theme Utility Color Overrides */
[data-theme="light"] .text-muted {
    color: var(--slate-600) !important;
}

[data-theme="light"] .text-light {
    color: var(--slate-800) !important;
}

[data-theme="light"] .text-inverse {
    color: var(--slate-900) !important;
}

[data-theme="light"] .card .text-muted,
[data-theme="light"] .feature-card .text-muted {
    color: var(--slate-600) !important;
}

[data-theme="light"] small,
[data-theme="light"] .card small,
[data-theme="light"] .feature-card small {
    color: var(--slate-600) !important;
}

/* Light Theme Dashboard Icon Colors - Make them more vibrant and professional */
[data-theme="light"] .icon-circle.bg-success {
    background: var(--gradient-success) !important;
}

[data-theme="light"] .icon-circle.bg-primary {
    background: var(--gradient-primary) !important;
}

[data-theme="light"] .icon-circle.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

[data-theme="light"] .icon-circle.bg-warning {
    background: var(--gradient-warning) !important;
}

[data-theme="light"] .icon-circle i {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Light Theme Feature Card Hover Effects */
[data-theme="light"] .feature-card:hover .icon-circle {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), var(--shadow-glow);
}

[data-theme="light"] .feature-card:hover .icon-circle.bg-success {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

[data-theme="light"] .feature-card:hover .icon-circle.bg-primary {
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

[data-theme="light"] .feature-card:hover .icon-circle.bg-info {
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

[data-theme="light"] .feature-card:hover .icon-circle.bg-warning {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

/* Enhanced Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-hero);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-primary);
    transform: scale(1.2);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-500) rgba(255, 255, 255, 0.1);
}

/* Enhanced Icon Circle System */
.icon-circle {
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-spring);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft-lg);
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
    margin: 0 auto 1.5rem;
}

.icon-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 30%, transparent 70%);
    border-radius: 50%;
    transform: scale(0);
    transition: transform var(--duration-normal) var(--ease-back);
    z-index: 1;
}

.icon-circle::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-success);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    z-index: -1;
}

.feature-card:hover .icon-circle::before {
    transform: scale(1);
}

.feature-card:hover .icon-circle::after {
    opacity: 1;
}

.feature-card:hover .icon-circle {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-2xl);
    border-color: rgba(255, 255, 255, 0.2);
}

.icon-circle i {
    position: relative;
    z-index: 2;
    transition: all var(--duration-normal) var(--ease-spring);
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.feature-card:hover .icon-circle i {
    transform: scale(1.15);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Enhanced Badge System */
.badge {
    font-weight: 600;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.025em;
    font-size: 0.8125rem;
    text-transform: uppercase;
    transition: all var(--duration-fast) var(--ease-spring);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.badge:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: var(--shadow-soft-md);
}

.badge:hover::before {
    opacity: 1;
}

.badge-lg {
    padding: 0.625rem 1.125rem;
    font-size: 0.9375rem;
    font-weight: 700;
}

.badge-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
}

/* Progress Bar Animations */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
}

/* Dropdown Menu Styles */
.dropdown-menu {
    background: var(--bg-card-dark);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    padding: 0.75rem 0;
}

.dropdown-item {
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    transition: all var(--duration-normal) var(--ease-out);
    border-radius: 0;
}

.dropdown-item:hover {
    background: var(--gradient-success);
    color: var(--text-inverse);
    transform: translateX(4px);
}

.dropdown-item:focus {
    background: var(--gradient-success);
    color: var(--text-inverse);
}

.dropdown-divider {
    border-color: var(--border-glass);
    margin: 0.5rem 0;
}

/* Card Border Variants */
.border-primary {
    border-color: rgba(6, 182, 212, 0.4) !important;
}

.border-success {
    border-color: rgba(16, 185, 129, 0.4) !important;
}

.border-info {
    border-color: rgba(6, 182, 212, 0.4) !important;
}

.border-warning {
    border-color: rgba(245, 158, 11, 0.4) !important;
}

.border-danger {
    border-color: rgba(239, 68, 68, 0.4) !important;
}

/* Professional Typography System */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text-inverse);
    margin-bottom: 1rem;
}

/* Card and dark background text */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.feature-card h1, .feature-card h2, .feature-card h3, .feature-card h4, .feature-card h5, .feature-card h6 {
    color: var(--text-inverse);
}

.card p, .card span, .card div, .card small,
.feature-card p, .feature-card span, .feature-card div, .feature-card small {
    color: var(--text-light);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { 
    font-size: 1.5rem;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.display-1 { font-size: 6rem; font-weight: 900; }
.display-2 { font-size: 5rem; font-weight: 900; }
.display-3 { font-size: 4rem; font-weight: 900; }
.display-4 { font-size: 3.5rem; font-weight: 900; }

.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-extrabold { font-weight: 800 !important; }
.fw-black { font-weight: 900 !important; }

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

/* Utility Classes */
.rounded-pill {
    border-radius: 50px !important;
}

.text-success {
    color: var(--emerald-400) !important;
}

.text-primary {
    color: var(--primary-400) !important;
}

.text-info {
    color: var(--primary-400) !important;
}

.text-warning {
    color: var(--orange-400) !important;
}

.text-danger {
    color: var(--red-400) !important;
}

.text-light {
    color: var(--text-light) !important;
}

.text-inverse {
    color: var(--text-inverse) !important;
}

/* Muted text for dark backgrounds */
.text-muted {
    color: var(--slate-400) !important;
}

/* Badge text colors */
.badge {
    color: var(--text-inverse) !important;
}

/* Animation Classes */
.animate-slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Additional Animation Keyframes */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.text-shimmer {
    background: var(--gradient-hero);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 3s ease-in-out infinite;
}

/* Opacity utilities */
.opacity-80 { opacity: 0.8; }
.opacity-70 { opacity: 0.7; }
.opacity-60 { opacity: 0.6; }
.opacity-50 { opacity: 0.5; }

.animate-in-view {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ripple Effect */
.ripple-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

/* Input Focus States */
.input-focused {
    position: relative;
}

.input-focused::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--success-gradient);
    transform: scaleX(0);
    animation: expandLine 0.3s ease-out forwards;
}

@keyframes expandLine {
    to {
        transform: scaleX(1);
    }
}

/* Floating Label Effect */
.floating-label {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-label .form-control:focus ~ .form-label,
.floating-label .form-control:not(:placeholder-shown) ~ .form-label {
    transform: translateY(-1.5rem) scale(0.85);
    color: #10b981;
}

.floating-label .form-label {
    position: absolute;
    top: 0.875rem;
    left: 1.25rem;
    transition: all 0.3s;
    pointer-events: none;
    background: var(--card-bg);
    padding: 0 0.5rem;
    color: var(--text-muted);
}

/* Loading Animations */
.loading-pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

.loading-bounce {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* Particle Background Animation */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0; }
    25% { opacity: 1; }
    50% { transform: translateY(-20px) rotate(180deg); }
    75% { opacity: 1; }
}

/* Notification Toast Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1055;
}

.toast {
    background: var(--bg-card-dark);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    color: var(--text-inverse);
}

.toast-header {
    background: var(--bg-glass-dark);
    color: var(--text-inverse);
    border-bottom: 1px solid var(--border-glass);
}

.toast-body {
    color: var(--text-light);
}

/* Success/Error State Animations */
.success-check {
    animation: successScale 0.5s ease-out;
}

@keyframes successScale {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.error-shake {
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Page Transition Effects */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: pageEnter 0.6s ease-out forwards;
}

@keyframes pageEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-slide-up,
    .animate-in-view,
    .progress-bar {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* =======================
 * PREMIUM UPGRADE STYLES
 * ======================= */

.btn-gradient-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-gradient-premium:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-gradient-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-gradient-premium:hover::before {
    left: 100%;
}

.btn-gradient-premium i {
    font-size: 0.9em;
}

/* Premium Badge */
.premium-badge {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Premium Feature Indicators */
.premium-feature {
    position: relative;
    opacity: 0.7;
}

.premium-feature::after {
    content: '👑';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    opacity: 0.8;
}

/* Subscription Page Animations */
@keyframes premium-glow {
    0% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8); }
    100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
}

.premium-highlight {
    animation: premium-glow 2s ease-in-out infinite;
}

/* Plan Comparison Styles */
.plan-comparison {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    padding: 1rem;
    margin: 1rem 0;
}

.plan-comparison .current-plan {
    background: #4CAF50;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-comparison .upgrade-available {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Mobile Responsive Premium Styles */
@media (max-width: 768px) {
    .btn-gradient-premium {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .upgrade-section small {
        font-size: 0.75rem;
    }
}

/* Navigation Active States */
.dropdown-item.active {
    background-color: var(--primary-500) !important;
    color: white !important;
    border-radius: 6px;
    margin: 2px;
    font-weight: 500;
}

.dropdown-item.active i {
    color: white !important;
}

[data-theme="light"] .dropdown-item.active {
    background: var(--gradient-success) !important;
    color: white !important;
    border-color: var(--emerald-500);
}

[data-theme="dark"] .dropdown-item.active {
    background: var(--primary-600) !important;
    color: var(--text-inverse) !important;
}

/* ================= NEW FEATURES STYLES ================= */

/* Purple theme colors */
.bg-purple {
    background-color: #6f42c1 !important;
}

.btn-purple {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: white;
}

.btn-purple:hover {
    background-color: #5a32a3;
    border-color: #5a32a3;
    color: white;
}

.btn-purple:focus, .btn-purple.focus {
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

.btn-purple:not(:disabled):not(.disabled):active,
.btn-purple:not(:disabled):not(.disabled).active {
    background-color: #4c2a92;
    border-color: #4c2a92;
    color: white;
}

.text-purple {
    color: #6f42c1 !important;
}

/* Water tracker specific styles */
.water-progress-container {
    position: relative;
    display: inline-block;
}

.water-progress-circle {
    transform: rotate(-90deg);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

/* Habit tracker specific styles */
.habit-item {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.habit-item:hover {
    border-left-color: var(--primary-500);
    background-color: rgba(59, 130, 246, 0.05);
}

.habit-item.completed {
    border-left-color: var(--success-500);
    background-color: rgba(34, 197, 94, 0.05);
}

.habit-check {
    appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.habit-check:checked {
    background-color: var(--success-500);
    border-color: var(--success-500);
}

.habit-check:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Theme customization styles */
.theme-preview {
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.theme-option {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.theme-option:hover {
    transform: translateY(-2px);
}

.theme-option.active .theme-preview-mini {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.theme-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mini-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.color-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.form-control-color {
    width: 50px;
    height: 38px;
    padding: 0.2rem;
    border-radius: 0.375rem;
    cursor: pointer;
}

.color-hex {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Consolas', monospace;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Enhanced glass card effect for new features */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Progress animations */
@keyframes progressFill {
    from { stroke-dashoffset: 502.65; }
    to { stroke-dashoffset: var(--target-offset); }
}

@keyframes streakPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.streak-animation {
    animation: streakPulse 0.6s ease-in-out;
}

/* Mobile optimizations for new features */
@media (max-width: 768px) {
    .water-progress-circle {
        width: 150px;
        height: 150px;
    }
    
    .habit-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        border-radius: 0.5rem;
        border-left-width: 3px;
    }
    
    .theme-option {
        margin-bottom: 1rem;
    }
    
    .color-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }
    
    .form-control-color {
        width: 100%;
        height: 50px;
    }
}

/* Dark theme support for new features */
[data-theme="dark"] .glass-card {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .habit-item {
    background-color: rgba(55, 65, 81, 0.5);
    color: #f3f4f6;
}

[data-theme="dark"] .habit-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .theme-preview {
    border-color: #4b5563;
}

[data-theme="dark"] .habit-check {
    border-color: #6b7280;
    background-color: #374151;
}

/* Feature card hover effects */
.feature-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.icon-circle {
    transition: all 0.3s ease;
}

.feature-card:hover .icon-circle {
    transform: scale(1.1);
}

/* Celebration animations */
@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes celebrationBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    40%, 43% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    70% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    90% {
        transform: translate(-50%, -50%) scale(1.02);
    }
}

.celebration-text {
    animation: celebrationBounce 2s ease-in-out;
}

/* Interactive elements */
.interactive {
    transition: all 0.2s ease;
}

.interactive:hover {
    transform: scale(1.02);
}

.interactive:active {
    transform: scale(0.98);
}


