/* Base styles and dark mode setup */
* {
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out,
    border-color 0.2s ease-in-out;
}

/* Ensure dark mode works properly */
html.dark {
  color-scheme: dark;
}

/* Custom scrollbar - fixed version */
::-webkit-scrollbar {
  width: 12px;
  display: block;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

html.dark ::-webkit-scrollbar-track {
  background: #1f2937;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: content-box;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
  border: 3px solid transparent;
  background-clip: content-box;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
  border: 3px solid transparent;
  background-clip: content-box;
}

/* Standard scrollbar for Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #c1c1c1 #f1f1f1;
}

html.dark * {
  scrollbar-color: #4b5563 #1f2937;
}

/* Keyframes and Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 1s ease-out 0.3s both;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out 0.5s both;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out 0.7s both;
}

/* Text Clamp Utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
