@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --code-font-size: 0.92rem;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

pre code, .font-mono {
  font-family: 'Fira Code', monospace;
}

pre code {
  font-size: var(--code-font-size, 0.92rem);
  line-height: 1.65;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 8px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 8px;
  border: 2px solid #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Code Viewport */
.code-viewport {
  max-height: 64vh;
  min-height: 320px;
}

/* Interactive Canvas Styling */
.interactive-canvas-wrapper {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

canvas.lab-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

/* Range Input Customization */
input[type="range"] {
  accent-color: #4f46e5;
  cursor: pointer;
}

/* Subtle Animations */
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInSlide 0.22s ease-out forwards;
}
