@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --color-brand: #10b981;
  --color-brand-dark: #059669;
  --color-bg: #F8FAFC;
  --color-text: #0f172a;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.03em;
  font-weight: 700;
}

/* High Contrast Form Fields */
input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

button {
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Premium Input Styling */
.input-premium {
  @apply bg-white border-2 border-slate-200 text-slate-900 placeholder-slate-500;
  @apply focus:border-emerald-500 focus:ring-4 focus:ring-emerald-500/20;
  @apply transition-all duration-300;
  backdrop-filter: blur(10px);
  min-height: 44px;
}

.input-premium:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* High Contrast Buttons */
.btn-primary {
  @apply bg-slate-900 text-white font-bold;
  @apply hover:bg-slate-800 active:bg-slate-900;
  @apply shadow-lg hover:shadow-xl;
  @apply transition-all duration-200;
  min-height: 44px;
  min-width: 44px;
}

.btn-secondary {
  @apply bg-emerald-600 text-white font-bold;
  @apply hover:bg-emerald-700 active:bg-emerald-800;
  @apply shadow-lg hover:shadow-xl;
  min-height: 44px;
  min-width: 44px;
}

label {
  @apply text-slate-900 font-semibold text-sm;
  display: block;
  margin-bottom: 0.5rem;
}

/* No Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Premium Animations */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

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

@keyframes scaleIn {
  from { 
    opacity: 0; 
    transform: scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: scale(1); 
  }
}

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

.animate-fadeIn {
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slideIn {
  animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Glassmorphism Effects */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Premium Shadows */
.shadow-premium {
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

html {
  scroll-behavior: smooth;
}

::selection {
  background-color: rgba(16, 185, 129, 0.3);
  color: #0f172a;
}

*:focus-visible {
  outline: 3px solid #10b981;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    background-color: #ffffff;
  }
  
  input, textarea, select {
    border-width: 2px;
    border-color: #000000;
  }
  
  button {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
