.toc-block {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff;
	border-bottom: 1px solid #e5e5e5;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	width: 100%;
	margin: 0;
}

.toc-container {
	display: flex;
	align-items: center;
	gap: 2rem;
	padding: 1rem 2rem;
	width: 100%;
	margin: 0;
}

.toc-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: #333;
	white-space: nowrap;
	flex-shrink: 0;
}

.toc-list {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	list-style-type: none;
	margin-bottom: 0;
	margin-top: 0;
	padding-bottom: 1.375rem;
	padding-left: 1.25rem;
	padding-top: 1.375rem;
	padding-right: 1.25rem;
	overflow-x: visible;
}

.toc-list::-webkit-scrollbar {
	height: 4px;
}

.toc-list::-webkit-scrollbar-track {
	background: transparent;
}

.toc-list::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 2px;
}

.toc-item {
	list-style: none !important;
	list-style-type: none !important;
}

.toc-item::before {
	display: none !important;
	content: none !important;
}

.toc-link {
	color: #666;
	text-decoration: none;
	font-size: 0.9375rem;
	transition: color 0.2s ease;
	position: relative;
	padding-bottom: 2px;
	display: block;
}

.toc-link:hover {
	color: #000;
}

.toc-link.active {
	color: #000;
	font-weight: 600;
}

.toc-link.active::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	right: 0;
	height: 2px;
	background: currentColor;
}

.toc-numbered {
	counter-reset: toc-counter;
}

.toc-numbered .toc-item {
	counter-increment: toc-counter;
}

.toc-numbered .toc-link::before {
	/* content: counter(toc-counter) ". "; */
	font-weight: 600;
	display: inline !important;
}

.toc-level-h3 {
	margin-left: 1rem;
}

.toc-level-h4 {
	margin-left: 2rem;
}

.toc-placeholder,
.toc-empty {
	color: #999;
	font-style: italic;
}

@media (max-width: 768px) {
	.toc-container {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
		padding: 0.75rem 1rem;
	}

	.toc-list {
		width: 100%;
		gap: 1rem;
		flex-wrap: wrap;
	}

	.toc-title {
		font-size: 1rem;
	}

	.toc-link {
		font-size: 0.875rem;
	}
}
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	line-height: 1.6;
	color: #333;
}

/* Full screen TOC container */
.toc-fullscreen {
	position: fixed;
	top: 97px;
	left: 0;
	width: 100vw;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	overflow: auto;
}

.toc-container {
	background: white;
	padding: 0;
	width: 100%;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
	animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.toc-title {
	font-size: 22px;
	margin: 0;
}

.toc-title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 80px;
	height: 4px;
	border-radius: 2px;
}

.toc-list {
	list-style: none;
	counter-reset: toc-counter;
	display: flex;
	flex-wrap: nowrap;
	gap: 20px;
	justify-content: center;
}

.toc-item {
	/* counter-increment: toc-counter; */
	/* flex: 1; */
	/* min-width: 250px; */
	/* max-width: 400px; */
}

.toc-link {
	display: flex;
	flex-direction: row;
	align-items: center;
	text-align: center;
	padding: 0 20px;
	text-decoration: none;
	/* color: #4a5568; */
	/* background: #f7fafc; */
	border-radius: 12px;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
	font-size: 16px;
	font-weight: 500;
	height: 100%;
}

.toc-link::before {
	/* content: counter(toc-counter, decimal-leading-zero); */
	font-size: 18px;
	font-weight: 700;
	color: #667eea;
	margin-bottom: 12px;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: white;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toc-link::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 0;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	transition: width 0.3s ease;
	z-index: -1;
	border-radius: 12px;
}

/*.toc-link:hover {*/
/*    color: white;*/
/*    transform: translateY(-4px);*/
/*    box-shadow: 0 12px 20px rgba(102, 126, 234, 0.3);*/
/*}*/

/*.toc-link:hover::before {*/
/*    color: white;*/
/*    background: rgba(255, 255, 255, 0.2);*/
/*}*/

/*.toc-link:hover::after {*/
/*    width: 100%;*/
/*}*/

.toc-link.active {
	/*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
	/*color: white;*/
	/*box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);*/
}

.toc-link.active::before {
	color: white;
	background: rgba(255, 255, 255, 0.2);
}

/* Content section */
.content {
	margin-left: 0;
	padding: 100px 60px;
	max-width: 1200px;
	margin: 0 auto;
}

.content-section {
	min-height: 100vh;
	padding: 80px 0;
	scroll-margin-top: 180px;
}

.content-section h2 {
	font-size: 42px;
	margin-bottom: 30px;
	color: #2d3748;
	font-weight: 700;
}

.content-section p {
	font-size: 18px;
	line-height: 1.8;
	color: #4a5568;
	margin-bottom: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
	.toc-fullscreen {
		padding: 20px;
	}

	.toc-container {
		padding: 40px 30px;
	}

	.toc-title {
		font-size: 28px;
		margin-bottom: 30px;
	}

	.toc-link {
		font-size: 16px;
		padding: 14px 18px;
	}

	.content {
		padding: 80px 30px;
	}

	.content-section h2 {
		font-size: 32px;
	}

	.content-section p {
		font-size: 16px;
	}
}
