/* Fallback for when theme is not set - CRITICAL FIX */
html:not([data-theme]) {
  /* Emergency fallback - ensures page is visible even if theme script fails */
  --bg-gradient: linear-gradient(to bottom right, #1e293b, #7c3aed, #0f172a);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-bg-lg: rgba(255, 255, 255, 0.1);
  --glass-text-primary: #ffffff;
  --glass-text-secondary: rgba(255, 255, 255, 0.85);
  --glass-text-tertiary: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-bg-button: rgba(255, 255, 255, 0.1);
  --ui-text-primary: #ffffff;
  --ui-text-secondary: rgba(255, 255, 255, 0.85);
  --ui-bg-elevated: rgba(255, 255, 255, 0.15);
  --ui-bg-secondary: rgba(255, 255, 255, 0.05);
  --ui-border-primary: rgba(255, 255, 255, 0.2);
  --ui-border-secondary: rgba(255, 255, 255, 0.1);
}

/* Theme Variables */
:root {
  /* Default theme - Dark */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-bg-lg: rgba(255, 255, 255, 0.1);
  --glass-bg-button: rgba(255, 255, 255, 0.1);
  --glass-bg-button-hover: rgba(255, 255, 255, 0.2);
  --glass-bg-input: rgba(255, 255, 255, 0.1);
  --glass-bg-input-focus: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-border-focus: rgb(96, 165, 250);
  --glass-border-focus-shadow: rgba(96, 165, 250, 0.3);
  --glass-shadow: rgba(0, 0, 0, 0.12);
  --glass-shadow-lg: rgba(0, 0, 0, 0.15);
  --glass-shadow-button: rgba(0, 0, 0, 0.2);
  --glass-text-primary: #ffffff;
  --glass-text-secondary: rgba(255, 255, 255, 0.85);
  --glass-text-tertiary: rgba(255, 255, 255, 0.7);
  --glass-text-accent: rgb(96, 165, 250);
  --glass-placeholder: rgba(255, 255, 255, 0.5);
  --grid-pattern: rgba(255, 255, 255, 0.1);
  --grid-opacity: 0.1;
  --bg-gradient: linear-gradient(to bottom right, #1e293b, #7c3aed, #0f172a);
  --bg-orb-1: rgba(147, 51, 234, 0.2);
  --bg-orb-2: rgba(59, 130, 246, 0.2);
  --bg-orb-3: rgba(99, 102, 241, 0.1);
  --bg-orb-4: rgba(147, 51, 234, 0.15);
  --bg-orb-5: rgba(59, 130, 246, 0.12);
  
  /* Premium Color Palette */
  --success-color: #34d399;
  --success-bg: rgba(52, 211, 153, 0.15);
  --success-border: rgba(52, 211, 153, 0.3);
  --warning-color: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.15);
  --warning-border: rgba(251, 191, 36, 0.3);
  --error-color: #f87171;
  --error-bg: rgba(248, 113, 113, 0.15);
  --error-border: rgba(248, 113, 113, 0.3);
  --premium-gold: #fcd34d;
  --premium-gold-bg: rgba(252, 211, 77, 0.15);
  --premium-gold-border: rgba(252, 211, 77, 0.3);
  --content-white: rgba(255, 255, 255, 0.15);
  --content-white-border: rgba(255, 255, 255, 0.25);
  
  /* Semantic UI Colors - Dark Theme */
  --ui-text-primary: #ffffff;
  --ui-text-secondary: rgba(255, 255, 255, 0.85);
  --ui-text-tertiary: rgba(255, 255, 255, 0.7);
  --ui-text-muted: rgba(255, 255, 255, 0.5);
  --ui-bg-primary: rgba(255, 255, 255, 0.1);
  --ui-bg-secondary: rgba(255, 255, 255, 0.05);
  --ui-bg-elevated: rgba(255, 255, 255, 0.15);
  --ui-border-primary: rgba(255, 255, 255, 0.2);
  --ui-border-secondary: rgba(255, 255, 255, 0.1);
  --ui-shadow: rgba(0, 0, 0, 0.2);
  --ui-bg-overlay: rgba(0, 0, 0, 0.6);
  
  /* Enhanced Polish Variables - Dark Theme */
  --glass-hover-bg-dark: rgba(255, 255, 255, 0.15);
  --glass-ring-dark: rgba(255, 255, 255, 0.1);
  --glass-shadow-dark: rgba(0, 0, 0, 0.3);
  --glass-border-subtle: rgba(255, 255, 255, 0.05);
  --avatar-bg-dark: rgba(30, 41, 59, 1);
  --avatar-ring-dark: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] {
  /* Dark theme - explicit selector */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-bg-lg: rgba(255, 255, 255, 0.1);
  --glass-bg-button: rgba(255, 255, 255, 0.1);
  --glass-bg-button-hover: rgba(255, 255, 255, 0.2);
  --glass-bg-input: rgba(255, 255, 255, 0.1);
  --glass-bg-input-focus: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-border-focus: rgb(96, 165, 250);
  --glass-border-focus-shadow: rgba(96, 165, 250, 0.3);
  --glass-shadow: rgba(0, 0, 0, 0.12);
  --glass-shadow-lg: rgba(0, 0, 0, 0.15);
  --glass-shadow-button: rgba(0, 0, 0, 0.2);
  --glass-text-primary: #ffffff;
  --glass-text-secondary: rgba(255, 255, 255, 0.85);
  --glass-text-tertiary: rgba(255, 255, 255, 0.7);
  --glass-text-accent: rgb(96, 165, 250);
  --glass-placeholder: rgba(255, 255, 255, 0.5);
  --grid-pattern: rgba(255, 255, 255, 0.1);
  --grid-opacity: 0.1;
  --bg-gradient: linear-gradient(to bottom right, #1e293b, #7c3aed, #0f172a);
  --bg-orb-1: rgba(147, 51, 234, 0.2);
  --bg-orb-2: rgba(59, 130, 246, 0.2);
  --bg-orb-3: rgba(99, 102, 241, 0.1);
  --bg-orb-4: rgba(147, 51, 234, 0.15);
  --bg-orb-5: rgba(59, 130, 246, 0.12);
  
  /* Premium Color Palette */
  --success-color: #34d399;
  --success-bg: rgba(52, 211, 153, 0.15);
  --success-border: rgba(52, 211, 153, 0.3);
  --warning-color: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.15);
  --warning-border: rgba(251, 191, 36, 0.3);
  --error-color: #f87171;
  --error-bg: rgba(248, 113, 113, 0.15);
  --error-border: rgba(248, 113, 113, 0.3);
  --premium-gold: #fcd34d;
  --premium-gold-bg: rgba(252, 211, 77, 0.15);
  --premium-gold-border: rgba(252, 211, 77, 0.3);
  --content-white: rgba(255, 255, 255, 0.15);
  --content-white-border: rgba(255, 255, 255, 0.25);
  
  /* Semantic UI Colors - Dark Theme */
  --ui-text-primary: #ffffff;
  --ui-text-secondary: rgba(255, 255, 255, 0.85);
  --ui-text-tertiary: rgba(255, 255, 255, 0.7);
  --ui-text-muted: rgba(255, 255, 255, 0.5);
  --ui-bg-primary: rgba(255, 255, 255, 0.1);
  --ui-bg-secondary: rgba(255, 255, 255, 0.05);
  --ui-bg-elevated: rgba(255, 255, 255, 0.15);
  --ui-border-primary: rgba(255, 255, 255, 0.2);
  --ui-border-secondary: rgba(255, 255, 255, 0.1);
  --ui-shadow: rgba(0, 0, 0, 0.2);
  --ui-bg-overlay: rgba(0, 0, 0, 0.6);
  
  /* Enhanced Polish Variables - Dark Theme */
  --glass-hover-bg-dark: rgba(255, 255, 255, 0.15);
  --glass-ring-dark: rgba(255, 255, 255, 0.1);
  --glass-shadow-dark: rgba(0, 0, 0, 0.3);
  --glass-border-subtle: rgba(255, 255, 255, 0.05);
  --avatar-bg-dark: rgba(30, 41, 59, 1);
  --avatar-ring-dark: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
  /* Refined Light Theme - Enhanced Luxury with Subtle Gradients */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-bg-lg: rgba(255, 255, 255, 0.95);
  --glass-bg-button: rgba(248, 250, 252, 0.9);
  --glass-bg-button-hover: rgba(241, 245, 249, 1);
  --glass-bg-input: rgba(255, 255, 255, 0.95);
  --glass-bg-input-focus: rgba(255, 255, 255, 1);
  --glass-border: rgba(148, 163, 184, 0.25);
  --glass-border-focus: rgba(55, 65, 81, 0.8);
  --glass-border-focus-shadow: rgba(55, 65, 81, 0.4);
  --glass-shadow: rgba(15, 23, 42, 0.12);
  --glass-shadow-lg: rgba(15, 23, 42, 0.18);
  --glass-shadow-button: rgba(15, 23, 42, 0.3);
  --glass-text-primary: #0f172a;
  --glass-text-secondary: #334155;
  --glass-text-tertiary: #475569;
  --glass-text-accent: #374151;
  --glass-placeholder: #94a3b8;
  --grid-pattern: rgba(0, 0, 0, 0.0);
  --grid-opacity: 0;
  --bg-gradient: #f8fafc;
  --bg-orb-1: rgba(0, 0, 0, 0.02);
  --bg-orb-2: rgba(0, 0, 0, 0.015);
  --bg-orb-3: rgba(0, 0, 0, 0.01);
  --bg-orb-4: rgba(0, 0, 0, 0.008);
  --bg-orb-5: rgba(0, 0, 0, 0.005);
  
  /* Premium Color Palette - Monochrome for Light Mode */
  --success-color: #374151;
  --success-bg: rgba(55, 65, 81, 0.08);
  --success-border: rgba(55, 65, 81, 0.25);
  --warning-color: #4b5563;
  --warning-bg: rgba(75, 85, 99, 0.08);
  --warning-border: rgba(75, 85, 99, 0.25);
  --error-color: #1f2937;
  --error-bg: rgba(31, 41, 55, 0.08);
  --error-border: rgba(31, 41, 55, 0.25);
  --premium-gold: #374151;
  --premium-gold-bg: rgba(55, 65, 81, 0.08);
  --premium-gold-border: rgba(55, 65, 81, 0.25);
  --content-white: rgba(255, 255, 255, 0.95);
  --content-white-border: rgba(148, 163, 184, 0.25);
  
  /* Semantic UI Colors - Light Theme */
  --ui-text-primary: #0f172a;
  --ui-text-secondary: #1e293b;
  --ui-text-tertiary: #334155;
  --ui-text-muted: #64748b;
  --ui-bg-primary: rgba(255, 255, 255, 0.8);
  --ui-bg-secondary: rgba(248, 250, 252, 0.9);
  --ui-bg-elevated: rgba(255, 255, 255, 0.95);
  --ui-border-primary: rgba(148, 163, 184, 0.3);
  --ui-border-secondary: rgba(148, 163, 184, 0.2);
  --ui-shadow: rgba(15, 23, 42, 0.1);
  --ui-bg-overlay: rgba(15, 23, 42, 0.4);
  
  /* Enhanced Polish Variables - Light Theme */
  --glass-hover-bg-light: rgba(248, 250, 252, 0.9);
  --glass-ring-light: rgba(148, 163, 184, 0.3);
  --glass-shadow-light: rgba(15, 23, 42, 0.1);
  --glass-border-subtle: rgba(148, 163, 184, 0.15);
  --avatar-bg-light: rgba(255, 255, 255, 0.95);
  --avatar-ring-light: rgba(148, 163, 184, 0.4);
}

/* Ring Color System for Both Themes */
:root,
[data-theme="dark"] {
  --tw-ring-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
  --tw-ring-color: rgba(148, 163, 184, 0.3);
}

/* Ensure ring colors are applied to ring utilities */
.ring-1 {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.hover\:ring-2:hover {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

/* Glassmorphism Theme Utility Classes */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: 0 8px 32px var(--glass-shadow);
}

.glass-card-lg {
  background: var(--glass-bg-lg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  box-shadow: 0 16px 64px var(--glass-shadow-lg);
}

.glass-button {
  background: var(--glass-bg-button);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.glass-button:hover {
  background: var(--glass-bg-button-hover);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 32px var(--glass-shadow-button);
}

.glass-input {
  background: var(--glass-bg-input);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--glass-text-primary);
  transition: all 0.3s ease;
}

.glass-input::placeholder {
  color: var(--glass-placeholder);
}

.glass-input:focus {
  background: var(--glass-bg-input-focus);
  border-color: var(--glass-border-focus);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
  outline: none;
}

.gradient-button {
  background: linear-gradient(to right, rgb(37, 99, 235), rgb(147, 51, 234));
  transition: all 0.3s ease;
}

.gradient-button:hover {
  background: linear-gradient(to right, rgb(29, 78, 216), rgb(126, 34, 206));
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.3);
}

/* Monochrome gradient buttons in light mode */
[data-theme="light"] .gradient-button {
  background: linear-gradient(to right, #374151, #1f2937);
}

[data-theme="light"] .gradient-button:hover {
  background: linear-gradient(to right, #1f2937, #111827);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Override all gradient backgrounds in light mode */
[data-theme="light"] [class*="bg-gradient-to"] {
  background: #374151 !important;
}

[data-theme="light"] [class*="from-blue"][class*="to-purple"],
[data-theme="light"] [class*="from-blue"][class*="to-indigo"] {
  background: linear-gradient(to right, #374151, #1f2937) !important;
}

/* Override inline gradient styles in light mode */
[data-theme="light"] [style*="from-blue"][style*="to-purple"] {
  background: linear-gradient(to right, #374151, #1f2937) !important;
}

/* Monochrome button shadows in light mode */
[data-theme="light"] [data-light-shadow],
[data-theme="light"] [style*="box-shadow:"] {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Premium button classes in light mode */
[data-theme="light"] .btn-premium-gold {
  background: #374151 !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .btn-premium-gold:hover {
  background: #1f2937 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .btn-premium-success {
  background: #4b5563 !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .btn-premium-success:hover {
  background: #374151 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Animation Classes */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slideIn {
  animation: slideIn 0.5s ease-out forwards;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Grid Pattern - Enhanced for Light Mode */
.bg-grid-pattern {
  background-image: 
    linear-gradient(var(--grid-pattern) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-pattern) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Light Mode Pattern Background */
[data-theme="light"] .bg-grid-pattern {
  background-color: #f8fafc;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 25% 25%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
  background-size: 20px 20px, 20px 20px, 40px 40px, 40px 40px;
  background-position: 0 0, 0 0, 0 0, 20px 20px;
}

/* Light Mode Static Background Override */
[data-theme="light"] [style*="background: var(--bg-gradient)"] {
  background: #f8fafc !important;
}

/* Apply solid background to body in light mode */
[data-theme="light"] body {
  background-color: #f8fafc;
}

/* Utility class for static background */
.bg-static-pattern {
  background-color: #f8fafc !important;
}

/* Remove grid pattern in light mode */
[data-theme="light"] .bg-grid-pattern {
  background-image: none !important;
  background-color: transparent;
}

/* Text Utilities */
.text-glass-primary {
  color: var(--glass-text-primary);
}

.text-glass-secondary {
  color: var(--glass-text-secondary);
}

.text-glass-tertiary {
  color: var(--glass-text-tertiary);
}

.text-glass-accent {
  color: var(--glass-text-accent);
}

/* Fix white-on-white text issues in light mode */
[data-theme="light"] .text-white {
  color: var(--glass-text-primary) !important;
}

[data-theme="light"] .text-white\/80 {
  color: var(--glass-text-secondary) !important;
}

[data-theme="light"] .text-white\/60 {
  color: var(--glass-text-tertiary) !important;
}

[data-theme="light"] .text-white\/40 {
  color: #94a3b8 !important;
}

[data-theme="light"] .placeholder-white\/50::placeholder {
  color: var(--glass-placeholder) !important;
}

/* Fix any remaining white text in inputs */
[data-theme="light"] input.text-white,
[data-theme="light"] textarea.text-white,
[data-theme="light"] select.text-white {
  color: var(--glass-text-primary) !important;
}

/* Fix hardcoded blue colors in light mode for monochrome theme */
[data-theme="light"] .text-blue-400,
[data-theme="light"] .text-blue-300,
[data-theme="light"] .text-blue-500,
[data-theme="light"] .text-blue-600 {
  color: var(--glass-text-accent) !important;
}

[data-theme="light"] .border-blue-500,
[data-theme="light"] .border-blue-400,
[data-theme="light"] .border-blue-600 {
  border-color: var(--glass-text-accent) !important;
}

[data-theme="light"] .bg-blue-500\/20,
[data-theme="light"] .bg-blue-400\/20 {
  background-color: rgba(55, 65, 81, 0.15) !important;
}

/* Fix remaining green/red/purple colors for monochrome */
[data-theme="light"] .text-green-400,
[data-theme="light"] .text-green-300 {
  color: var(--success-color) !important;
}

[data-theme="light"] .text-red-400,
[data-theme="light"] .text-red-300 {
  color: var(--error-color) !important;
}

[data-theme="light"] .text-purple-400,
[data-theme="light"] .text-purple-300 {
  color: var(--glass-text-accent) !important;
}

[data-theme="light"] .text-yellow-400,
[data-theme="light"] .text-yellow-300 {
  color: var(--warning-color) !important;
}

/* Global Typography Consistency - Enhanced Polish */
p, .body-text, .description-text {
  font-weight: 400 !important;
  line-height: 1.6;
}

/* Ensure paragraph text maintains proper weight */
p:not(.font-semibold):not(.font-bold):not(.font-medium) {
  font-weight: normal;
}

/* Enhanced text contrast for light theme */
[data-theme="light"] .text-glass-secondary {
  color: #475569 !important;
}

[data-theme="light"] .text-glass-tertiary {
  color: #64748b !important;
}

/* Improved badge styling */
.badge-enhanced {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.badge-enhanced.badge-success {
  background: var(--success-bg);
  color: var(--success-color);
  border: 1px solid var(--success-border);
}

.badge-enhanced.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-color);
  border: 1px solid var(--warning-border);
}

.badge-enhanced.badge-error {
  background: var(--error-bg);
  color: var(--error-color);
  border: 1px solid var(--error-border);
}

/* Enhanced Status Colors - Theme Aware */
.text-success {
  color: var(--success-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-error {
  color: var(--error-color);
}

.bg-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.bg-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}

.bg-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
}

/* Enhanced status indicators with better contrast */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.status-pill.status-success {
  background: var(--success-bg);
  color: var(--success-color);
  border: 1px solid var(--success-border);
}

.status-pill.status-warning {
  background: var(--warning-bg);
  color: var(--warning-color);
  border: 1px solid var(--warning-border);
}

.status-pill.status-error {
  background: var(--error-bg);
  color: var(--error-color);
  border: 1px solid var(--error-border);
}

.status-pill.status-info {
  background: var(--glass-bg-button);
  color: var(--glass-text-accent);
  border: 1px solid var(--glass-border);
}

.status-pill.status-neutral {
  background: var(--glass-bg);
  color: var(--glass-text-secondary);
  border: 1px solid var(--glass-border);
}

/* White Navigation Bar - Always White Regardless of Theme */
nav {
  background: white !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
}

nav * {
  color: inherit !important;
}

nav .text-gray-900,
nav .text-slate-900 {
  color: #0f172a !important;
}

nav .text-slate-600 {
  color: #475569 !important;
}

nav .text-slate-400 {
  color: #94a3b8 !important;
}

nav .text-slate-700 {
  color: #334155 !important;
}

nav .bg-slate-800 {
  background-color: #1e293b !important;
}

nav .bg-slate-900:hover {
  background-color: #0f172a !important;
}

nav .bg-slate-100 {
  background-color: #f1f5f9 !important;
}

nav .bg-slate-200:hover {
  background-color: #e2e8f0 !important;
}

/* Remove underlines from nav links */
nav a {
  text-decoration: none !important;
}

nav a:hover {
  text-decoration: none !important;
}

/* Navigation scroll behavior */
.nav-shrunk {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.nav-shrunk .hidden.sm\\:block {
  display: none !important;
}

.nav-shrunk #nav-content {
  height: 60px !important;
}

/* Scale down typography on scroll */
.nav-shrunk .text-lg {
  font-size: 1rem !important;
}

.nav-shrunk .text-xs {
  font-size: 0.65rem !important;
}

/* Responsive Glassmorphism - Enhanced Mobile */
@media (max-width: 768px) {
  .glass-card {
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    padding: 1rem;
  }
  
  .glass-card-lg {
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    padding: 1.5rem;
  }
  
  /* Reduce blur effects on mobile for better performance */
  .glass-button {
    backdrop-filter: blur(8px);
    min-height: 44px;
    min-width: 44px;
  }
  
  .glass-input {
    backdrop-filter: blur(8px);
    min-height: 44px;
  }
  
  /* Enhanced mobile interactions */
  .glass-interactive:hover {
    transform: translateY(-1px) scale(1.005);
  }
  
  /* Improved text sizing on mobile */
  .text-responsive {
    font-size: 0.875rem;
  }
  
  @media (min-width: 640px) {
    .text-responsive {
      font-size: 1rem;
    }
  }
}

/* Low-end device optimizations */
@media (max-width: 480px) {
  .glass-card {
    backdrop-filter: blur(6px);
  }
  
  .glass-card-lg {
    backdrop-filter: blur(8px);
  }
  
  .glass-button {
    backdrop-filter: blur(6px);
  }
  
  .glass-input {
    backdrop-filter: blur(6px);
  }
  
  /* Disable expensive animations on small screens */
  .animate-float {
    animation: none;
  }
  
  /* Simplify background orbs */
  .bg-orb-1, .bg-orb-2, .bg-orb-3 {
    opacity: 0.5;
  }
}

/* Reduced motion and low-end device support */
@media (prefers-reduced-motion: reduce) {
  .animate-fadeInUp,
  .animate-slideIn,
  .animate-float,
  .animate-pulse,
  .animate-countUp {
    animation: none;
  }
  
  .premium-hover:hover,
  .premium-hover-subtle:hover {
    transform: none;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Mobile touch devices */
  .glass-card {
    backdrop-filter: blur(6px);
  }
  
  /* Ensure minimum touch targets */
  button, .btn, [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Improve button spacing for touch */
  .btn + .btn {
    margin-left: 8px;
  }
}

/* JavaScript-based performance optimizations */
.low-end-device .glass-card,
.low-end-device .glass-card-lg {
  backdrop-filter: none !important;
  background: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .low-end-device .glass-card,
[data-theme="dark"] .low-end-device .glass-card-lg {
  background: rgba(0, 0, 0, 0.8) !important;
}

.low-end-device .glass-button {
  backdrop-filter: none !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.low-end-device .animate-float,
.low-end-device .animate-pulse,
.low-end-device .animate-fadeInUp,
.low-end-device .animate-slideIn {
  animation: none !important;
}

.performance-degraded .glass-card,
.performance-degraded .glass-card-lg,
.performance-degraded .glass-button,
.performance-degraded .glass-input {
  backdrop-filter: blur(4px) !important;
}

.performance-degraded .animate-float {
  animation: none !important;
}

/* Mobile device specific optimizations */
.mobile-device .glass-card {
  backdrop-filter: blur(8px);
}

.mobile-device .glass-card-lg {
  backdrop-filter: blur(10px);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(10px)) {
  .glass-card,
  .glass-card-lg,
  .glass-button,
  .glass-input {
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.95);
  }
  
  [data-theme="dark"] .glass-card,
  [data-theme="dark"] .glass-card-lg,
  [data-theme="dark"] .glass-button,
  [data-theme="dark"] .glass-input {
    background: rgba(0, 0, 0, 0.85);
  }
}

/* Premium Color Utility Classes */
.premium-success {
  color: var(--success-color);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.premium-warning {
  color: var(--warning-color);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}

.premium-error {
  color: var(--error-color);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
}

.premium-gold {
  color: var(--premium-gold);
  background: var(--premium-gold-bg);
  border: 1px solid var(--premium-gold-border);
}

.content-white {
  background: var(--content-white);
  border: 1px solid var(--content-white-border);
  backdrop-filter: blur(20px);
}

/* Premium Button Styles */
.btn-premium-success {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-premium-success:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

.btn-premium-gold {
  background: linear-gradient(135deg, var(--premium-gold), #d97706);
  color: white;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

.btn-premium-gold:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(251, 191, 36, 0.4);
}

.btn-premium-white {
  background: var(--content-white);
  color: var(--glass-text-primary);
  border: 1px solid var(--content-white-border);
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.btn-premium-white:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

/* Premium Card Variants */
.card-premium-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  backdrop-filter: blur(20px);
}

.card-premium-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  backdrop-filter: blur(20px);
}

.card-premium-gold {
  background: var(--premium-gold-bg);
  border: 1px solid var(--premium-gold-border);
  backdrop-filter: blur(20px);
}

.card-content-white {
  background: var(--content-white);
  border: 1px solid var(--content-white-border);
  backdrop-filter: blur(20px);
}

/* Premium Animations */
@keyframes countUp {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

.animate-countUp {
  animation: countUp 0.6s ease-out forwards;
}

.skeleton {
  background: linear-gradient(90deg, var(--glass-bg) 25%, var(--glass-bg-lg) 50%, var(--glass-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

/* Premium Hover Effects */
.premium-hover:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-hover-subtle:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Interactive States - Polish & Consistency */
.glass-interactive {
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.glass-interactive:hover {
  background: var(--glass-hover-bg-dark);
  box-shadow: 0 8px 32px var(--glass-shadow-dark);
  transform: translateY(-2px) scale(1.01);
  border-color: var(--glass-ring-dark);
}

[data-theme="light"] .glass-interactive:hover {
  background: var(--glass-hover-bg-light);
  box-shadow: 0 8px 32px var(--glass-shadow-light);
  border-color: var(--glass-ring-light);
}

/* Enhanced Card Styling - Unified White Borders */
.glass-card,
.glass-card-lg {
  border: 1px solid var(--glass-border) !important;
}

[data-theme="light"] .glass-card,
[data-theme="light"] .glass-card-lg {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .glass-card:hover,
[data-theme="light"] .glass-card-lg:hover {
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1), 0 2px 4px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(55, 65, 81, 0.4) !important;
}

[data-theme="dark"] .glass-card,
[data-theme="dark"] .glass-card-lg {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] .glass-card:hover,
[data-theme="dark"] .glass-card-lg:hover {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Event Card Specific Styling */
.event-card {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: var(--glass-bg-lg);
  backdrop-filter: blur(20px);
  transition: all 0.2s ease-in-out;
}

.event-card:hover {
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 40px var(--glass-shadow-lg);
}

[data-theme="light"] .event-card {
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .event-card:hover {
  border-color: rgba(55, 65, 81, 0.4) !important;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.1);
}

/* Utility Classes for Consistent White Borders */
.border-glass {
  border: 1px solid var(--glass-border) !important;
}

.border-glass-subtle {
  border: 1px solid var(--glass-border-subtle) !important;
}

.border-white-glass {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

[data-theme="light"] .border-white-glass {
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

/* Override any potential dark borders */
.no-dark-border,
.no-dark-border * {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

[data-theme="light"] .no-dark-border,
[data-theme="light"] .no-dark-border * {
  border-color: rgba(148, 163, 184, 0.25) !important;
}

/* Enhanced button interactions */
.btn-enhanced {
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
}

.btn-enhanced::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 0.6s ease-in-out;
}

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

.btn-enhanced:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Status Indicators */
.status-success {
  color: var(--success-color);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.status-warning {
  color: var(--warning-color);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}

.status-error {
  color: var(--error-color);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
}

/* Range Slider Styling for Glassmorphism */
.slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.slider-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, rgb(96, 165, 250), rgb(147, 51, 234));
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.slider-thumb::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 20px rgba(96, 165, 250, 0.5);
}

.slider-thumb::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, rgb(96, 165, 250), rgb(147, 51, 234));
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.slider-thumb::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 20px rgba(96, 165, 250, 0.5);
}