* {
  font-family: 'Space Grotesk', sans-serif;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Header gradient */
.header-gradient {
  background: linear-gradient(135deg, 
    rgba(15, 23, 42, 0.95) 0%, 
    rgba(30, 41, 59, 0.9) 50%, 
    rgba(49, 46, 129, 0.3) 100%
  );
}

/* Canvas stage grid pattern */
.canvas-stage {
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.1) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Hide scrollbar for category nav */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Custom slider styling */
.slider-custom {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #334155;
  border-radius: 3px;
  outline: none;
}

.slider-custom::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #818cf8;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.4);
  transition: all 0.15s ease;
}

.slider-custom::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 15px rgba(129, 140, 248, 0.6);
}

.slider-custom::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #818cf8;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.4);
}

/* Category pill hover effect */
.category-pill {
  position: relative;
  overflow: hidden;
}

.category-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.category-pill:hover::before {
  opacity: 1;
}

/* Interaction card hover */
.interaction-card {
  position: relative;
  overflow: hidden;
}

.interaction-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(129, 140, 248, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.interaction-card:hover::after {
  opacity: 1;
}

/* Shimmer animation for skeleton loader */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

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

/* Slide up animation for mobile controls */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-slide-up {
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bounce animation for emoji */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.group:hover .group-hover\:animate-bounce {
  animation: bounce 0.5s ease-in-out infinite;
}

/* Control panel styling */
.control-panel {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.control-panel::-webkit-scrollbar {
  width: 4px;
}

.control-panel::-webkit-scrollbar-track {
  background: transparent;
}

.control-panel::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 2px;
}

/* Select dropdown styling */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23818cf8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* Glow effects */
.glow-indigo {
  box-shadow: 0 0 30px rgba(129, 140, 248, 0.3);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .canvas-stage {
    min-height: 300px;
  }
}

/* Focus states for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
button, input, select, .interaction-card, .category-pill {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Code preview syntax-like coloring */
pre {
  color: #e2e8f0;
}

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

/* Subtle pulse for active interaction indicator */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}