html, body { margin: 0; padding: 0; }
* { box-sizing: border-box; }
body {
	font-family: Arial, sans-serif;
	line-height: 1.4;
	margin: 0;
	padding: 20px;
	background-color: #f8f9fa;
}
.container { margin: 0 auto; max-width: 1600px;}
h1 { text-align: center; color: #343a40; }
h1 span { color: #adb5bd; font-size: 0.8em; }
h2 { font-size: 20px; }
h3 { font-size: 1rem; margin: 0 0 14px 0; color: #495057; }
.recipe {
	background-color: #fff;
	border: 1px solid #ced4da;
	border-radius: 5px;
	margin-bottom: 15px;
	padding: 15px 15px 10px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.recipe h2 {
	margin: 0 0 10px;
	color: #495057;
	border-bottom: 1px solid #228be6;
	padding-bottom: 15px;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}
.class-name { font-size: 0.8em; color: #7f8c8d; font-weight: normal; display: none;}
.showFull .class-name { display: unset; }
.ingredients, .result { margin-bottom: 10px; }
.ingredients-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 10px;
}
.ingredient, .result-item {
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 3px;
	padding: 10px;
}
.ingredient-name,
.result-name {
	font-weight: bold;
	color: #1c7ed6;
	margin-bottom: 5px;
	cursor: pointer;
	text-decoration: underline;
	transition: all 0.2s ease;
}
.ingredient-name:hover,
.result-name:hover {
	text-decoration: none;
	color: #0ca678;
}
.collapsed-ingredients .ingredient-name,
.collapsed-ingredients .result-name {
	color: #495057;
}
.ingredient-details, .result-details { font-size: 0.8em; }
.param-name { font-weight: bold; color: #343a40; }
.param-value { color: #212529; }
.search-container { margin-bottom: 20px; }
#searchInput {
	width: 100%;
	padding: 10px;
	font-size: 16px;
	border: 1px solid #ddd;
	border-radius: 4px;
}
.ingredient-details p, .result-details p { margin: 1px 0; }
.text-gray { color: #888; }
.text-green { color: #40c057; }
.text-orange { color: #fd7e14; }
.recipe-time {
	font-size: 0.8em;
	font-style: italic;
	color: #868e96;
	font-weight: normal;
	flex: 1;
	text-align: right;
	padding-right: 20px;
}
.damage-level { margin-top: 3px; }
.damage-level-title {
	font-weight: bold;
	color: #343a40;
	margin-bottom: 1px;
}
.ingredient-group { margin-bottom: 10px; }
.ingredient-group-title {
	font-weight: bold;
	color: #495057;
	margin-bottom: 10px;
}
.recipe-content {
	display: flex;
	justify-content: space-between;
	margin: 20px 0 0;
}
.ingredients {
	flex: 2;
	margin-right: 20px;
	margin-bottom: 0;
}
.result-wrapper { flex: 1; max-width: 360px;
	padding-top: 32px; }
.result {
	position: sticky;
	top: 40px;
	background: #fff;
	padding: 14px;
	border: 1px solid #e0e0e0;
	border-radius: 5px;
}
.ingredients-row { display: flex; justify-content: space-between; }
.ingredients-row .ingredient-group { flex: 1; margin-right: 10px; }
.ingredients-row .ingredient-group:last-child { margin-right: 0; }
.no-result { font-style: italic; color: #868e96; }
.result-details {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 5px;
}
.result-details .param-name { text-align: right; padding-right: 5px; }
.result-details .param-value { text-align: left; }
.toggle-btn {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background-color: #228be6;
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	font-size: 24px;
	cursor: pointer;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	z-index: 1000;
}
.toggle-btn:hover {
	background-color: #1971c2;
}
.collapsible {
	transition: max-height 0.3s ease-out;
}
.collapsed { max-height: 0; }
.collapsed.collapsible { overflow: hidden; }
.recipe-header { cursor: pointer; margin-bottom: 0; }
.recipe-header::after {
	content: '▼';
	float: right;
	transition: transform 0.3s ease-out;
}
.recipe-header.collapsed::after { transform: rotate(-90deg); }
.recipe-header.collapsed {
	max-height: unset;
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: 5px;
}
.recipe-content.collapsed {
	max-height: 0;
	padding: 0;
	margin: 0;
	border: none;
}
.collapsed-ingredients .ingredient-details,
.collapsed-ingredients .result-details { display: none; }
.collapsed-ingredients .ingredient-name,
.collapsed-ingredients .result-name { margin-bottom: 0; }
.loader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, 0.8);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 9999;
}
.spinner {
	width: 50px;
	height: 50px;
	border: 5px solid #f3f3f3;
	border-top: 5px solid #228be6;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
.loader p {
	margin-top: 10px;
	font-size: 18px;
	color: #228be6;
}