@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap");

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

@layer base {
	:root {
		--background: 220 25% 95%;
		--foreground: 220 10% 15%;
		--card: 220 25% 98%;
		--card-foreground: 220 10% 15%;
		--popover: 220 25% 98%;
		--popover-foreground: 220 10% 15%;
		--primary: 222.2 47.4% 11.2%;
		--primary-foreground: 210 40% 98%;
		--secondary: 220 18% 88%;
		--secondary-foreground: 222.2 35% 25%;
		--muted: 220 18% 88%;
		--muted-foreground: 220 15% 40%;
		--accent: 220 20% 86%;
		--accent-foreground: 222.2 35% 25%;
		--destructive: 0 90% 65%;
		--destructive-foreground: 210 40% 98%;
		--border: 220 15% 89%;
		--input: 220 15% 89%;
		--ring: 222.2 84% 4.9%;
		--radius: 0.5rem;
		--code-background: hsl(220 25% 93%);
		--code-foreground: hsl(220 10% 10%);
		--code-keyword: hsl(300 85% 42%);
		--code-class: hsl(120 60% 35%);
		--code-function: hsl(220 95% 45%);
		--code-string: hsl(120 60% 35%);
		--code-comment: hsl(220 15% 35%);
		--code-operator: hsl(180 85% 30%);
		--code-punctuation: hsl(220 15% 20%);
		color-scheme: light;
	}

	.dark {
		--background: 240 10% 8%;
		--foreground: 0 0% 98%;
		--card: 240 10% 10%;
		--card-foreground: 0 0% 98%;
		--popover: 240 10% 10%;
		--popover-foreground: 0 0% 98%;
		--primary: 0 0% 98%;
		--primary-foreground: 240 5.9% 10%;
		--secondary: 240 3.7% 15.9%;
		--secondary-foreground: 0 0% 98%;
		--muted: 240 3.7% 15.9%;
		--muted-foreground: 240 5% 64.9%;
		--accent: 240 3.7% 15.9%;
		--accent-foreground: 0 0% 98%;
		--destructive: 0 75% 45%;
		--destructive-foreground: 0 0% 98%;
		--border: 240 3.7% 15.9%;
		--input: 240 3.7% 15.9%;
		--ring: 240 4.9% 83.9%;
		--radius: 0.5rem;
		--code-background: hsl(240 10% 10%);
		--code-foreground: hsl(0 0% 98%);
		--code-keyword: #c678dd;
		--code-class: #98c379;
		--code-function: #61afef;
		--code-string: #98c379;
		--code-comment: hsl(240 5% 64.9%);
		--code-operator: #56b6c2;
		--code-punctuation: hsl(240 5% 64.9%);
		color-scheme: dark;
	}
}

body {
	margin: 0;
	font-family: "IBM Plex Mono", monospace;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background-color: hsl(var(--background));
	color: hsl(var(--foreground));
}

code {
	font-family: "IBM Plex Mono", monospace;
	color: var(--code-foreground);
}

.markdown-content {
	max-width: 100%;
	overflow-wrap: break-word;
	word-wrap: break-word;
	word-break: break-word;
}

.markdown-content h1 {
	font-size: 1.875rem;
	font-weight: 700;
	margin-top: 1.5rem;
	margin-bottom: 1rem;
	line-height: 1.2;
}

.markdown-content h2 {
	font-size: 1.5rem;
	font-weight: 600;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	line-height: 1.3;
}

.markdown-content h3 {
	font-size: 1.25rem;
	font-weight: 600;
	margin-top: 1.25rem;
	margin-bottom: 0.5rem;
	line-height: 1.4;
}

.markdown-content p {
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
}

.markdown-content ul,
.markdown-content ol {
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
	padding-left: 1.5rem;
}

.markdown-content li {
	margin-top: 0.25rem;
	margin-bottom: 0.25rem;
}

.markdown-content pre {
	background-color: var(--code-background);
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
	padding: 1rem;
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
	overflow-x: auto;
	color: var(--code-foreground);
	max-width: 100%;
}

.markdown-content code {
	background-color: var(--code-background);
	border: 1px solid hsl(var(--border));
	border-radius: 0.25rem;
	padding: 0.125rem 0.375rem;
	font-size: 0.875rem;
	color: var(--code-foreground);
	word-break: break-all;
}

.markdown-content pre code {
	background-color: transparent;
	border: none;
	padding: 0;
	font-size: 0.875rem;
	color: inherit;
	word-break: normal;
	overflow-wrap: normal;
}

.markdown-content blockquote {
	border-left: 4px solid hsl(var(--border));
	padding-left: 1rem;
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
	color: hsl(var(--muted-foreground));
	font-style: italic;
}

.markdown-content a {
	color: hsl(var(--primary));
	text-decoration: underline;
	word-break: break-word;
}

.markdown-content a:hover {
	color: hsl(var(--primary) / 0.85);
}

.markdown-content table {
	border-collapse: collapse;
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
	width: max-content;
	min-width: 100%;
}

.markdown-content th,
.markdown-content td {
	border: 1px solid hsl(var(--border));
	padding: 0.5rem 0.75rem;
	text-align: left;
	word-wrap: break-word;
	overflow-wrap: break-word;
	max-width: 32rem;
}

.markdown-content th {
	white-space: nowrap;
}

.markdown-content th {
	background-color: hsl(var(--muted));
	font-weight: 600;
}

/* Scrollbar styling */
.scrollbar-hide {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
	display: none;
}
