@import "tailwindcss";

/* Professional Theme System with CSS Variables */
:root {
  /* Colors - Light Theme */
  --color-primary-50: hsl(243, 100%, 97%);
  --color-primary-100: hsl(243, 100%, 94%);
  --color-primary-200: hsl(243, 96%, 87%);
  --color-primary-300: hsl(243, 94%, 76%);
  --color-primary-400: hsl(243, 91%, 64%);
  --color-primary-500: hsl(243, 84%, 54%);
  --color-primary-600: hsl(243, 75%, 48%);
  --color-primary-700: hsl(243, 71%, 40%);
  --color-primary-800: hsl(243, 64%, 32%);
  --color-primary-900: hsl(243, 58%, 25%);
  
  /* Secondary Colors - Cyan/Teal */
  --color-secondary-50: hsl(185, 95%, 96%);
  --color-secondary-100: hsl(185, 92%, 91%);
  --color-secondary-200: hsl(186, 92%, 81%);
  --color-secondary-300: hsl(187, 92%, 69%);
  --color-secondary-400: hsl(188, 85%, 53%);
  --color-secondary-500: hsl(189, 94%, 43%);
  --color-secondary-600: hsl(191, 91%, 36%);
  --color-secondary-700: hsl(193, 82%, 31%);
  --color-secondary-800: hsl(194, 69%, 27%);
  --color-secondary-900: hsl(196, 64%, 24%);
  
  /* Accent Colors - Coral/Pink */
  --color-accent-50: hsl(327, 73%, 97%);
  --color-accent-100: hsl(325, 78%, 94%);
  --color-accent-200: hsl(325, 84%, 86%);
  --color-accent-300: hsl(327, 87%, 75%);
  --color-accent-400: hsl(329, 86%, 60%);
  --color-accent-500: hsl(330, 81%, 49%);
  --color-accent-600: hsl(333, 71%, 42%);
  --color-accent-700: hsl(335, 68%, 35%);
  --color-accent-800: hsl(336, 63%, 29%);
  --color-accent-900: hsl(336, 60%, 25%);
  
  /* Neutral Colors with slight tints */
  --color-gray-50: hsl(220, 60%, 98%);
  --color-gray-100: hsl(220, 50%, 96%);
  --color-gray-200: hsl(220, 40%, 92%);
  --color-gray-300: hsl(220, 30%, 85%);
  --color-gray-400: hsl(220, 20%, 65%);
  --color-gray-500: hsl(220, 15%, 47%);
  --color-gray-600: hsl(220, 18%, 35%);
  --color-gray-700: hsl(220, 23%, 27%);
  --color-gray-800: hsl(220, 30%, 17%);
  --color-gray-900: hsl(222, 47%, 11%);
  
  /* Semantic Colors - More Vibrant */
  --color-success-light: hsl(152, 76%, 94%);
  --color-success: hsl(152, 69%, 48%);
  --color-success-dark: hsl(152, 71%, 38%);
  
  --color-warning-light: hsl(38, 100%, 94%);
  --color-warning: hsl(38, 95%, 52%);
  --color-warning-dark: hsl(38, 93%, 42%);
  
  --color-error-light: hsl(348, 86%, 94%);
  --color-error: hsl(348, 83%, 58%);
  --color-error-dark: hsl(348, 84%, 48%);
  
  --color-info-light: hsl(199, 95%, 94%);
  --color-info: hsl(199, 95%, 54%);
  --color-info-dark: hsl(199, 92%, 44%);
  
  /* Applied Colors - Vibrant Light Theme */
  --bg-primary: linear-gradient(to bottom right, hsl(280, 100%, 99%), hsl(220, 100%, 98%), hsl(185, 100%, 98%));
  --bg-secondary: hsl(0, 0%, 100%);
  --bg-tertiary: hsl(243, 100%, 98%);
  --bg-hover: hsl(243, 95%, 96%);
  --bg-active: hsl(243, 90%, 94%);
  --bg-sidebar: linear-gradient(to bottom, hsl(243, 100%, 98%), hsl(220, 100%, 97%));
  --bg-card-primary: linear-gradient(135deg, hsl(243, 100%, 97%) 0%, hsl(243, 90%, 95%) 100%);
  --bg-card-secondary: linear-gradient(135deg, hsl(185, 95%, 97%) 0%, hsl(199, 90%, 96%) 100%);
  --bg-card-accent: linear-gradient(135deg, hsl(327, 73%, 97%) 0%, hsl(327, 65%, 95%) 100%);
  
  --text-primary: var(--color-gray-900);
  --text-secondary: var(--color-gray-700);
  --text-tertiary: var(--color-gray-600);
  --text-placeholder: var(--color-gray-400);
  
  --border-primary: hsl(243, 30%, 90%);
  --border-secondary: hsl(243, 20%, 85%);
  --border-focus: var(--color-primary-500);
  
  /* Link colors */
  --color-link: var(--color-primary-400);
  
  /* Colored Shadows for Light Theme */
  --shadow-xs: 0 1px 2px 0 hsl(243, 50%, 80% / 0.1);
  --shadow-sm: 0 1px 3px 0 hsl(243, 50%, 70% / 0.12), 0 1px 2px -1px hsl(243, 50%, 70% / 0.12);
  --shadow-md: 0 4px 6px -1px hsl(243, 50%, 60% / 0.12), 0 2px 4px -2px hsl(243, 50%, 60% / 0.12);
  --shadow-lg: 0 10px 15px -3px hsl(243, 50%, 50% / 0.12), 0 4px 6px -4px hsl(243, 50%, 50% / 0.12);
  --shadow-xl: 0 20px 25px -5px hsl(243, 50%, 40% / 0.12), 0 8px 10px -6px hsl(243, 50%, 40% / 0.12);
  --shadow-2xl: 0 25px 50px -12px hsl(243, 50%, 30% / 0.25);
  --shadow-primary: 0 4px 15px 0 hsl(243, 84%, 54% / 0.3);
  --shadow-secondary: 0 4px 15px 0 hsl(189, 94%, 43% / 0.3);
  --shadow-accent: 0 4px 15px 0 hsl(330, 81%, 49% / 0.3);
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Border Radius */
  --radius-sm: 0.125rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index */
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* Semantic Theme Variables */
  --gradient-button-primary: linear-gradient(135deg, var(--color-primary-400) 0%, var(--color-primary-600) 100%);
  --gradient-button-secondary: linear-gradient(135deg, var(--color-secondary-400) 0%, var(--color-secondary-600) 100%);
  --gradient-button-accent: linear-gradient(135deg, var(--color-accent-400) 0%, var(--color-accent-600) 100%);
  --gradient-card-1: linear-gradient(135deg, var(--color-primary-100), var(--color-primary-50));
  --gradient-card-2: linear-gradient(135deg, var(--color-secondary-100), var(--color-secondary-50));
  --gradient-card-3: linear-gradient(135deg, var(--color-accent-100), var(--color-accent-50));
  --glass-background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(243, 240, 255, 0.85) 50%, rgba(240, 248, 255, 0.85) 100%);
  --glass-border: rgba(147, 129, 255, 0.2);
  --icon-gradient-start: #B8ADFF;
  --icon-gradient-end: #D4C5FF;
  --icon-hover-gradient-start: #22D3EE;
  --icon-hover-gradient-end: #5EEAD4;
  
  /* Tailwind compatibility */
  --background: var(--bg-primary);
  --foreground: var(--text-primary);
  --primary: 231 84% 48%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 231 84% 48%;
}

@theme inline {
  --color-background: var(--bg-primary);
  --color-foreground: var(--text-primary);
  --color-primary: var(--color-primary-400);
  --color-primary-foreground: hsl(var(--primary-foreground));
  --color-secondary: hsl(var(--secondary));
  --color-secondary-foreground: hsl(var(--secondary-foreground));
  --color-destructive: hsl(var(--destructive));
  --color-destructive-foreground: hsl(var(--destructive-foreground));
  --color-muted: hsl(var(--muted));
  --color-muted-foreground: hsl(var(--muted-foreground));
  --color-accent: hsl(var(--accent));
  --color-accent-foreground: hsl(var(--accent-foreground));
  --color-border: var(--border-primary);
  --color-input: var(--border-primary);
  --color-ring: var(--color-primary-500);
  --font-sans: var(--font-sans);
  --font-mono: var(--font-mono);
}

/* Smooth transition for theme changes */
* {
  transition: background-color var(--transition-base), 
              color var(--transition-base), 
              border-color var(--transition-base);
}

/* Disable transitions on theme change to prevent flash */
html.theme-transition-disable * {
  transition: none !important;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: var(--leading-normal);
  overscroll-behavior-y: contain;
  /* Prevent pull-to-refresh on mobile */
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

html {
  overscroll-behavior-y: contain;
  height: 100%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: var(--radius-md);
  border: 3px solid var(--bg-tertiary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}

/* Selection colors */
::selection {
  background: var(--color-primary-500);
  color: white;
}

::-moz-selection {
  background: var(--color-primary-500);
  color: white;
}

/* Dark Theme */
[data-theme="dark"] {
  /* Applied Colors */
  --bg-primary: var(--color-gray-900);
  --bg-secondary: var(--color-gray-800);
  --bg-tertiary: var(--color-gray-700);
  --bg-hover: var(--color-gray-700);
  --bg-active: var(--color-gray-600);
  --bg-sidebar: var(--color-gray-800);
  --bg-card-primary: var(--color-gray-800);
  --bg-card-secondary: var(--color-gray-800);
  --bg-card-accent: var(--color-gray-800);
  
  --text-primary: var(--color-gray-50);
  --text-secondary: var(--color-gray-200);
  --text-tertiary: var(--color-gray-300);
  --text-placeholder: var(--color-gray-500);
  
  --border-primary: var(--color-gray-700);
  --border-secondary: var(--color-gray-600);
  
  /* Link colors - lighter for better readability */
  --color-link: var(--color-secondary-400);
  
  /* Adjust shadows for dark theme */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.1);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.2), 0 1px 2px -1px rgb(0 0 0 / 0.2);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.2), 0 2px 4px -2px rgb(0 0 0 / 0.2);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.2);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.2), 0 8px 10px -6px rgb(0 0 0 / 0.2);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.5);
  --shadow-primary: 0 4px 15px 0 rgb(0 0 0 / 0.3);
  --shadow-secondary: 0 4px 15px 0 rgb(0 0 0 / 0.3);
  --shadow-accent: 0 4px 15px 0 rgb(0 0 0 / 0.3);
  
  /* Semantic Theme Variables - Dark Theme */
  --gradient-button-primary: linear-gradient(135deg, var(--color-primary-500) 0%, var(--color-primary-700) 100%);
  --gradient-button-secondary: linear-gradient(135deg, var(--color-secondary-500) 0%, var(--color-secondary-700) 100%);
  --gradient-button-accent: linear-gradient(135deg, var(--color-accent-500) 0%, var(--color-accent-700) 100%);
  --gradient-card-1: var(--color-gray-800);
  --gradient-card-2: var(--color-gray-800);
  --gradient-card-3: var(--color-gray-800);
  --glass-background: rgba(17, 25, 40, 0.75);
  --glass-border: rgba(255, 255, 255, 0.125);
  --icon-gradient-start: #A5B4FC;
  --icon-gradient-end: #C4B5FD;
  --icon-hover-gradient-start: #06B6D4;
  --icon-hover-gradient-end: #10B981;
}

/* Utility Classes */
.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: var(--transition-base);
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: var(--transition-base);
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: var(--transition-base);
}

/* Shadow utilities */
.shadow-primary {
  box-shadow: var(--shadow-primary);
}

.shadow-secondary {
  box-shadow: var(--shadow-secondary);
}

.shadow-accent {
  box-shadow: var(--shadow-accent);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

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

.animate-fadeIn {
  animation: fadeIn var(--transition-base) ease-out;
}

.animate-slideIn {
  animation: slideIn var(--transition-slow) ease-out;
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Focus Styles */
.focus-ring {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus-ring:focus-visible {
  outline-color: var(--color-primary-500);
}

/* Glassmorphism Effect */
.glass {
  background: var(--glass-background);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}

/* Gradient Card Utilities */
.gradient-card-1 {
  background: var(--gradient-card-1);
  border: 1px solid var(--border-primary);
}

.gradient-card-2 {
  background: var(--gradient-card-2);
  border: 1px solid var(--border-primary);
}

.gradient-card-3 {
  background: var(--gradient-card-3);
  border: 1px solid var(--border-primary);
}

.glass-card {
  background: var(--bg-card-primary);
  backdrop-filter: blur(15px) saturate(150%);
  -webkit-backdrop-filter: blur(15px) saturate(150%);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-md);
}

/* Glass variants using semantic variables */
.glass-primary {
  background: var(--bg-card-primary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-primary);
}

.glass-secondary {
  background: var(--bg-card-secondary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-primary);
}

.glass-accent {
  background: var(--bg-card-accent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-primary);
}

/* Gradient Backgrounds */
.gradient-primary {
  background: linear-gradient(135deg, var(--color-primary-400) 0%, var(--color-primary-600) 100%);
  box-shadow: var(--shadow-primary);
}

.gradient-secondary {
  background: linear-gradient(135deg, var(--color-secondary-400) 0%, var(--color-secondary-600) 100%);
  box-shadow: var(--shadow-secondary);
}

.gradient-accent {
  background: linear-gradient(135deg, var(--color-accent-400) 0%, var(--color-accent-600) 100%);
  box-shadow: var(--shadow-accent);
}

.gradient-warm {
  background: linear-gradient(135deg, #ff6b6b 0%, #f06595 100%);
}

.gradient-cool {
  background: linear-gradient(135deg, #4dabf7 0%, #3bc9db 100%);
}

/* Vibrant Mesh Gradients */
.gradient-mesh {
  background-image: 
    radial-gradient(at 40% 20%, hsla(243, 100%, 80%, 0.3) 0px, transparent 50%),
    radial-gradient(at 80% 0%, hsla(199, 100%, 75%, 0.3) 0px, transparent 50%),
    radial-gradient(at 0% 50%, hsla(327, 100%, 80%, 0.3) 0px, transparent 50%),
    radial-gradient(at 80% 80%, hsla(185, 100%, 75%, 0.3) 0px, transparent 50%),
    radial-gradient(at 20% 80%, hsla(243, 100%, 85%, 0.3) 0px, transparent 50%);
}

.gradient-mesh-vibrant {
  background: 
    linear-gradient(to bottom right, transparent, hsla(243, 100%, 90%, 0.2)),
    radial-gradient(ellipse at top left, hsla(280, 100%, 85%, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at top right, hsla(199, 100%, 80%, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, hsla(185, 100%, 80%, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, hsla(327, 100%, 85%, 0.4) 0%, transparent 50%);
}

.gradient-aurora {
  background: linear-gradient(45deg, 
    hsla(243, 100%, 85%, 0.3) 0%, 
    hsla(199, 100%, 80%, 0.3) 20%, 
    hsla(185, 100%, 75%, 0.3) 40%, 
    hsla(327, 100%, 80%, 0.3) 60%, 
    hsla(243, 100%, 85%, 0.3) 80%, 
    hsla(280, 100%, 80%, 0.3) 100%);
  background-size: 400% 400%;
  animation: aurora 15s ease infinite;
}

@keyframes aurora {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Enhanced Button Styles */
.btn-primary {
  background: var(--gradient-button-primary);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-primary);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary::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 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

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

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-primary);
}

.btn-secondary {
  background: var(--gradient-button-secondary);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-secondary);
  border: 1px solid transparent;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-accent {
  background: var(--gradient-button-accent);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-accent);
  border: 1px solid transparent;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* Modern Card Styles */
.card-hover {
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(99, 102, 241, 0.05) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card-hover:hover::before {
  opacity: 1;
}

.card-hover:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .card-hover:hover {
  box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.3);
}

/* Subtle animations */
.float {
  animation: float 6s ease-in-out infinite;
}

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

/* Glow effects */
.glow {
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
}

.glow-subtle {
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

/* Modern input styles - Vibrant for light theme */
.input-modern {
  background: linear-gradient(to right, 
    rgba(255, 255, 255, 0.95), 
    rgba(249, 247, 255, 0.95));
  border: 2px solid rgba(147, 129, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.5rem;
  transition: all var(--transition-base);
  box-shadow: 
    0 2px 8px 0 rgba(147, 129, 255, 0.08),
    inset 0 1px 2px 0 rgba(147, 129, 255, 0.05);
}

@media (min-width: 640px) {
  .input-modern {
    padding: 0.75rem 1rem;
  }
}

.input-modern:hover {
  border-color: rgba(147, 129, 255, 0.3);
  background: linear-gradient(to right, 
    rgba(255, 255, 255, 1), 
    rgba(245, 241, 255, 1));
}

.input-modern:focus {
  border-color: var(--color-primary-500);
  background: linear-gradient(to right, 
    rgba(255, 255, 255, 1), 
    rgba(241, 236, 255, 1));
  box-shadow: 
    0 0 0 3px rgba(147, 129, 255, 0.15),
    0 2px 12px 0 rgba(147, 129, 255, 0.15),
    inset 0 1px 2px 0 rgba(147, 129, 255, 0.1);
  outline: none;
}

[data-theme="dark"] .input-modern {
  background: var(--bg-secondary);
  border: 2px solid transparent;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .input-modern:hover {
  background: var(--bg-secondary);
  border-color: transparent;
}

[data-theme="dark"] .input-modern:focus {
  background: var(--bg-primary);
  border-color: var(--color-primary-500);
  box-shadow: 
    0 0 0 3px rgba(79, 70, 229, 0.2),
    0 2px 8px 0 rgba(0, 0, 0, 0.2);
}

/* Header Gradient - Light Theme Only */
.header-gradient {
  background: 
    linear-gradient(135deg, 
      rgba(147, 129, 255, 0.25) 0%, 
      rgba(199, 163, 255, 0.20) 25%,
      rgba(34, 211, 238, 0.15) 50%,
      rgba(94, 234, 212, 0.18) 65%,
      rgba(147, 129, 255, 0.22) 100%),
    linear-gradient(to right, 
      rgba(249, 247, 255, 0.9),
      rgba(240, 249, 255, 0.9));
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(147, 129, 255, 0.2);
}

/* Dark theme uses original glass style */
[data-theme="dark"] .header-gradient {
  background: var(--glass-background);
}

[data-theme="dark"] .header-gradient::before {
  display: none;
}

.header-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Mapbox GL CSS fixes for React 19 and container height */
.mapboxgl-canvas {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100% !important;
  height: 100% !important;
}

.mapboxgl-map {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Fix for deck.gl canvas positioning */
#deckgl-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Ensure map container has proper dimensions */
.map-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Mobile-specific fixes */
@media (max-width: 1024px) {
  /* Prevent overscroll on mobile */
  .mobile-no-overscroll {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix for mobile sheet interactions */
  .mobile-sheet-content {
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Ensure drag handle doesn't conflict with browser gestures */
  .drag-handle {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
  /* Compact button styles for mobile */
  .btn-primary {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
}

/* Ultra-small screen adjustments */
@media (max-width: 400px) {
  /* Further reduce padding and font sizes */
  .btn-primary {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
  
  /* Ensure buttons have minimum touch target */
  button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Compact header adjustments */
  header {
    font-size: 0.875rem;
  }
}

/* Icon button utility class for proper centering */
.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Handle text scaling for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Toast Animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

.toast-item {
  transition: all 0.3s ease-out;
}
