/* Base Styles for Modern Minimalist Design */
:root {
  --primary-900: rgb(68, 56, 47); /* Dark matte tan for light mode */
  --primary-800: rgb(87, 73, 63); /* Lighter matte tan */
  --primary-600: rgb(75, 85, 99);
  --primary-500: rgb(107, 114, 128);
  --primary-400: rgb(156, 163, 175);
  --primary-200: rgb(229, 231, 235);
  --primary-100: rgb(243, 244, 246);
  --primary-50: rgb(249, 250, 251);
}

/* Global Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation Styles */
#navbar {
  transition: all 0.3s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

/* Language Dropdown */
#language-dropdown {
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  pointer-events: none;
}

#language-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Mobile Menu */
#mobile-menu {
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.3s ease;
  max-height: 0;
  overflow: hidden;
}

#mobile-menu.show {
  opacity: 1;
  transform: translateY(0);
  max-height: 300px;
}

/* Light Mode Tan Colors */
.text-gray-900 {
  color: rgb(68, 56, 47) !important;
}

.bg-gray-900 {
  background-color: rgb(68, 56, 47) !important;
}

.hover\:bg-gray-800:hover {
  background-color: rgb(87, 73, 63) !important;
}

/* Theme Toggle Styles */
[data-theme="dark"] {
  background-color: rgb(0, 0, 0);
  color: rgb(243, 244, 246);
}

[data-theme="dark"] #navbar {
  background: rgba(0, 0, 0, 0.95);
  border-bottom-color: rgb(38, 38, 38);
}

[data-theme="dark"] .bg-white {
  background-color: rgb(23, 23, 23) !important;
}

[data-theme="dark"] .bg-gray-50 {
  background-color: rgb(0, 0, 0) !important;
}

[data-theme="dark"] .text-gray-900 {
  color: rgb(243, 244, 246) !important;
}

[data-theme="dark"] .text-gray-600 {
  color: rgb(156, 163, 175) !important;
}

[data-theme="dark"] .text-gray-500 {
  color: rgb(107, 114, 128) !important;
}

[data-theme="dark"] .text-gray-700 {
  color: rgb(209, 213, 219) !important;
}

[data-theme="dark"] .border-gray-200 {
  border-color: rgb(38, 38, 38) !important;
}

[data-theme="dark"] .bg-gray-100 {
  background-color: rgb(38, 38, 38) !important;
}

[data-theme="dark"] .text-gray-800 {
  color: rgb(209, 213, 219) !important;
}

[data-theme="dark"] .bg-gray-900 {
  background-color: rgb(243, 244, 246) !important;
}

[data-theme="dark"] .text-white {
  color: rgb(0, 0, 0) !important;
}

[data-theme="dark"] .hover\:bg-gray-800:hover {
  background-color: rgb(209, 213, 219) !important;
}

[data-theme="dark"] .hover\:bg-gray-50:hover {
  background-color: rgb(38, 38, 38) !important;
}

[data-theme="dark"] .group:hover .group-hover\:bg-gray-900 {
  background-color: rgb(243, 244, 246) !important;
}

[data-theme="dark"] .group:hover .group-hover\:text-white {
  color: rgb(0, 0, 0) !important;
}

/* Animation Styles */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Smooth Transitions */
.transition-all {
  transition: all 0.2s ease;
}

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

::-webkit-scrollbar-track {
  background: rgb(249, 250, 251);
}

::-webkit-scrollbar-thumb {
  background: rgb(156, 163, 175);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgb(107, 114, 128);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: rgb(23, 23, 23);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgb(75, 85, 99);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgb(107, 114, 128);
}

/* Form Enhancements */
input:focus,
textarea:focus {
  outline: none;
  border-color: rgb(107, 114, 128);
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea {
  background-color: rgb(55, 65, 81);
  border-color: rgb(75, 85, 99);
  color: rgb(243, 244, 246);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: rgb(156, 163, 175);
}

/* Alert Styles */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  min-width: 300px;
  max-width: 500px;
  animation: slideInRight 0.3s ease;
}

.alert-success {
  background-color: rgb(220, 252, 231);
  color: rgb(21, 128, 61);
  border: 1px solid rgb(187, 247, 208);
}

.alert-error {
  background-color: rgb(254, 226, 226);
  color: rgb(185, 28, 28);
  border: 1px solid rgb(252, 165, 165);
}

[data-theme="dark"] .alert-success {
  background-color: rgb(21, 128, 61);
  color: rgb(220, 252, 231);
  border-color: rgb(34, 197, 94);
}

[data-theme="dark"] .alert-error {
  background-color: rgb(185, 28, 28);
  color: rgb(254, 226, 226);
  border-color: rgb(239, 68, 68);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Accessibility Enhancements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Keyboard Navigation */
body.keyboard-nav button:focus,
body.keyboard-nav a:focus,
body.keyboard-nav input:focus,
body.keyboard-nav textarea:focus {
  outline: 2px solid rgb(107, 114, 128);
  outline-offset: 2px;
}

/* High Contrast Support */
@media (prefers-contrast: high) {
  .border-gray-200 {
    border-color: rgb(75, 85, 99);
  }
  
  .shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  }
}

/* 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;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Print Styles */
@media print {
  #navbar,
  #mobile-menu,
  #theme-toggle,
  #language-toggle,
  .alert {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .bg-gray-50 {
    background: white !important;
  }
  
  .shadow-sm,
  .shadow-md {
    box-shadow: none !important;
  }
  
  .border-gray-200 {
    border-color: #ccc !important;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .text-5xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  
  .text-7xl {
    font-size: 3rem;
    line-height: 1;
  }
  
  .py-24 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  
  .px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.2s ease;
}

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

/* Focus Visible Support */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgb(107, 114, 128);
  outline-offset: 2px;
}

/* gsdlog.app Inspired Button Styles */
.btn-gsd-primary {
  background: linear-gradient(145deg, rgb(68, 56, 47), rgb(87, 73, 63));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 32px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-gsd-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgb(87, 73, 63), rgb(68, 56, 47));
}

.btn-gsd-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-gsd-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgb(68, 56, 47);
  border: 1px solid rgba(68, 56, 47, 0.3);
  border-radius: 50px;
  padding: 12px 32px;
  font-weight: 600;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-gsd-secondary:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border-color: rgba(68, 56, 47, 0.5);
}

.btn-gsd-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* Dark mode button adaptations */
[data-theme="dark"] .btn-gsd-primary {
  background: linear-gradient(145deg, rgb(55, 55, 55), rgb(75, 75, 75));
  color: white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-gsd-primary:hover {
  background: linear-gradient(145deg, rgb(75, 75, 75), rgb(95, 95, 95));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-gsd-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: rgb(243, 244, 246);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .btn-gsd-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Glass morphism effect for special elements */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Enhanced hover effects for cards */
.card-gsd {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
}

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

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