@import 'katex/dist/katex.min.css';

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    @apply bg-dark-700 text-dark-50;
  }
}

@layer components {
  .card {
    @apply bg-dark-600 rounded-lg shadow-lg p-6;
  }

  .btn {
    @apply px-4 py-2 rounded-md font-semibold transition-all duration-200;
  }

  .btn-primary {
    @apply btn bg-primary-500 text-white hover:bg-primary-600;
  }

  .btn-secondary {
    @apply btn bg-dark-500 text-dark-50 hover:bg-dark-400;
  }

  .input {
    @apply bg-dark-500 border border-dark-400 rounded-md px-3 py-2 text-dark-50 focus:outline-none focus:ring-2 focus:ring-primary-500;
  }

  .badge {
    @apply inline-block px-2 py-1 text-xs font-semibold rounded-full;
  }

  .badge-success {
    @apply badge bg-green-900 text-green-300;
  }

  .badge-warning {
    @apply badge bg-yellow-900 text-yellow-300;
  }

  .badge-error {
    @apply badge bg-red-900 text-red-300;
  }

  .badge-info {
    @apply badge bg-blue-900 text-blue-300;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  @apply bg-dark-700;
}

::-webkit-scrollbar-thumb {
  @apply bg-dark-500 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-dark-400;
}

/* KaTeX Math Rendering */
.katex {
  font-size: 1.1em !important;
  color: inherit !important;
}

.katex-display {
  margin: 1em 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
}

.katex-display > .katex {
  color: #e2e8f0 !important;
}

/* Markdown body styles */
.markdown-body {
  color: #e2e8f0;
  line-height: 1.7;
}

.markdown-body .katex-display {
  background: rgba(30, 41, 59, 0.5);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
}

/* Code blocks in markdown should have proper width */
.markdown-body pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
}
