/* Custom styles for the entire site */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Animation classes */
.animate-fade-in {
  animation: fadeIn 0.8s ease-in-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out forwards;
}

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

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

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

.hover-glow {
  transition: box-shadow 0.2s ease-out;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* Gradient styles */
.gradient-text {
  background: linear-gradient(90deg, #4f46e5, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.gradient-text-variant {
  background: linear-gradient(90deg, #e09718, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}


/* Copy command styles */
.copy-command {
  position: relative;
  background: #1a1a1a;
  color: #ffffff;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-family: monospace;
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  max-width: 100%;
  overflow-x: auto;
}

.copy-command button {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
  transition: color 0.2s;
}

.copy-command button:hover {
  color: #ffffff;
}

/* Starlight customizations */
:root {
  --sl-color-accent: #4f46e5;
  --sl-color-accent-high: #312e81;
}

/* Improved scrollbar for code blocks and pre elements */
pre::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

pre::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

pre::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 4px;
}

/* Text reveal animation helper */
.text-reveal {
  visibility: hidden;
}