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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

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

/* Editor styles */
.editor-textarea {
  resize: none;
  outline: none;
}

.editor-textarea:focus {
  outline: none;
}

/* Preview styles */
.preview-content h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.preview-content h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.preview-content h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.preview-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.preview-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.preview-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.preview-content code {
  background-color: #f1f5f9;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.875rem;
}

.dark .preview-content code {
  background-color: #1e293b;
}

.preview-content pre {
  background-color: #f1f5f9;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.dark .preview-content pre {
  background-color: #1e293b;
}

.preview-content pre code {
  background-color: transparent;
  padding: 0;
}

.preview-content blockquote {
  border-left: 4px solid #cbd5e1;
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 1rem;
  color: #64748b;
}

.dark .preview-content blockquote {
  border-left-color: #475569;
  color: #94a3b8;
}

.preview-content a {
  color: #3b82f6;
  text-decoration: underline;
}

.preview-content a:hover {
  color: #2563eb;
}

.preview-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.preview-content th,
.preview-content td {
  border: 1px solid #e2e8f0;
  padding: 0.5rem;
  text-align: left;
}

.dark .preview-content th,
.dark .preview-content td {
  border-color: #334155;
}

.preview-content th {
  background-color: #f8fafc;
  font-weight: bold;
}

.dark .preview-content th {
  background-color: #1e293b;
}

.preview-content hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 1.5rem 0;
}

.dark .preview-content hr {
  border-top-color: #334155;
}
