* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Crimson Pro', Georgia, serif;
}

h1, h2, h3, button, input, textarea, select, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

.font-serif {
  font-family: 'Crimson Pro', Georgia, serif;
}

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

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

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-4px);
  }
}

.animate-bounce {
  animation: bounce 1s infinite;
}

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

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

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

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

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #fb923c;
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

/* Focus states */
input:focus, textarea:focus, select:focus {
  outline: none;
}

/* Range input styling */
input[type="range"] {
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: #fde68a;
}

.dark input[type="range"] {
  background: #475569;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e, #f97316);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Transition for theme changes */
html.dark {
  color-scheme: dark;
}

/* Better textarea sizing */
textarea {
  min-height: 48px;
  max-height: 120px;
}

/* Mobile optimizations */
@media (max-width: 1024px) {
  button, input, textarea, select {
    min-height: 44px;
  }
}