@media print {
	header, nav {
		display: none;
	}
	
	body {
		background: white;
		color: black;
		margin: 0;
		padding: 0;
	}
	
	.cheatsheet-container {
		max-width: 100%;
		margin: 0;
		padding: 0;
	}
	
	.cheatsheet-header {
		page-break-after: avoid;
		border-bottom: 1px solid #000;
		margin-bottom: 1rem;
		padding-bottom: 0.5rem;
	}
	
	.cheatsheet-print {
		columns: 1;
		column-gap: 0;
	}
	
	.algo-section {
		page-break-inside: avoid;
		border-color: #000 !important;
		background: white !important;
		color: #000 !important;
	}
	
	.algo-section h3 {
		color: #000 !important;
		margin-top: 0.5rem;
		margin-bottom: 0.3rem;
	}
	
	.algo-section pre {
		background: #f5f5f5 !important;
		border: 1px solid #ccc;
		padding: 0.5rem !important;
		font-size: 0.7rem !important;
	}
	
	.algo-section code {
		color: #000 !important;
	}
	
	.category-title {
		color: #000 !important;
		border-bottom: 1px solid #000;
		page-break-after: avoid;
		margin-top: 0.8rem;
		margin-bottom: 0.5rem;
	}
	
	.complexity-badge {
		border: 1px solid #000 !important;
		background: white !important;
		color: #000 !important;
	}
	
	.print-button {
		display: none !important;
	}
}

.cheatsheet-container {
	max-width: 1000px;
	margin: 0 auto;
}

.cheatsheet-header {
	text-align: center;
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid #3498db;
}

.cheatsheet-header h2 {
	font-size: 2rem;
	color: #3498db;
	margin-bottom: 0.5rem;
}

.cheatsheet-header p {
	color: #95a5a6;
	font-size: 0.9rem;
}

.print-button {
	background: #3498db;
	color: white;
	border: none;
	padding: 0.7rem 1.5rem;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9rem;
	margin-bottom: 2rem;
	transition: background 0.2s ease;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.print-button:hover {
	background: #2980b9;
}

.category-section {
	margin-bottom: 3rem;
	break-inside: avoid;
	page-break-inside: avoid;
}

.category-title {
	font-size: 1.5rem;
	color: #e74c3c;
	margin-bottom: 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #e74c3c;
}

.category-description {
	color: #95a5a6;
	font-size: 0.9rem;
	margin-bottom: 1rem;
	font-style: italic;
}

.algo-section {
	background: #2d2d2d;
	border-left: 3px solid #3498db;
	padding: 1rem;
	margin-bottom: 1.5rem;
	border-radius: 4px;
	break-inside: avoid;
	page-break-inside: avoid;
}

.algo-section h3 {
	color: #3498db;
	font-size: 1rem;
	margin-bottom: 0.8rem;
	font-weight: 600;
}

.algo-description {
	color: #bdc3c7;
	font-size: 0.85rem;
	margin-bottom: 0.8rem;
	line-height: 1.5;
}

.algo-author {
	color: #95a5a6;
	font-size: 0.8rem;
	font-style: italic;
	margin: -0.5rem 0 0.5rem 0;
}

.complexity-info {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 0.8rem;
	flex-wrap: wrap;
}

.complexity-badge {
	font-size: 0.75rem;
	padding: 0.3rem 0.6rem;
	border-radius: 12px;
	font-weight: 600;
	font-family: 'Courier New', monospace;
}

.complexity-badge.time {
	background: rgba(46, 204, 113, 0.2);
	color: #2ecc71;
	border: 1px solid #2ecc71;
}

.complexity-badge.space {
	background: rgba(155, 89, 182, 0.2);
	color: #9b59b6;
	border: 1px solid #9b59b6;
}

.algo-section pre {
	margin: 0;
	background: #1e1e1e;
	padding: 0.8rem;
	border-radius: 4px;
	overflow-x: auto;
}

.algo-section code {
	font-size: 0.75rem;
	line-height: 1.4;
	font-family: 'Courier New', Courier, monospace;
}

.no-algos {
	text-align: center;
	padding: 4rem 2rem;
	color: #95a5a6;
}

.cheatsheet-print {
	columns: 2;
	column-gap: 2rem;
	column-fill: balance;
}

@media (max-width: 1200px) {
	.cheatsheet-print {
		columns: 1;
		column-gap: 0;
	}
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
	.cheatsheet-container {
		padding: 0 1rem;
	}
	
	.cheatsheet-header {
		margin-bottom: 1.5rem;
		padding-bottom: 0.8rem;
	}
	
	.cheatsheet-header h2 {
		font-size: 1.6rem;
	}
	
	.cheatsheet-header p {
		font-size: 0.85rem;
	}
	
	.print-button {
		padding: 0.6rem 1.2rem;
		font-size: 0.85rem;
		margin-bottom: 1.5rem;
		width: 100%;
		max-width: 300px;
	}
	
	.category-section {
		margin-bottom: 2rem;
	}
	
	.category-title {
		font-size: 1.3rem;
	}
	
	.category-description {
		font-size: 0.85rem;
	}
	
	.algo-section {
		padding: 0.8rem;
		margin-bottom: 1rem;
	}
	
	.algo-section h3 {
		font-size: 0.95rem;
	}
	
	.algo-description {
		font-size: 0.8rem;
	}
	
	.algo-author {
		font-size: 0.75rem;
	}
	
	.complexity-badge {
		font-size: 0.7rem;
		padding: 0.25rem 0.5rem;
	}
	
	.algo-section pre {
		padding: 0.6rem;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	
	.algo-section code {
		font-size: 0.7rem;
		line-height: 1.3;
	}
	
	.no-algos {
		padding: 3rem 1rem;
	}
}

@media (max-width: 480px) {
	.cheatsheet-header h2 {
		font-size: 1.4rem;
	}
	
	.category-title {
		font-size: 1.1rem;
	}
	
	.algo-section {
		padding: 0.6rem;
	}
	
	.algo-section h3 {
		font-size: 0.9rem;
	}
	
	.algo-description {
		font-size: 0.75rem;
	}
	
	.complexity-badge {
		font-size: 0.65rem;
	}
	
	.algo-section code {
		font-size: 0.65rem;
	}
}