* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', sans-serif;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	background: linear-gradient(135deg, #1a1a1a, #2c2c2c, #1a1a1a);
	color: #e0e0e0;
	overflow: hidden;
	position: relative;
}

/* Добавляем текстуру металла */
body::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image:
		radial-gradient(
			circle at 25% 25%,
			rgba(100, 100, 100, 0.1) 2px,
			transparent 2px
		),
		radial-gradient(
			circle at 75% 75%,
			rgba(100, 100, 100, 0.1) 2px,
			transparent 2px
		);
	background-size: 60px 60px;
	pointer-events: none;
}

.container {
	display: flex;
	flex-direction: column;
	gap: 30px;
	padding: 20px;
	width: 100%;
	max-width: 1440px;
	position: relative;
	z-index: 1;
}

.wrapper {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
	border-radius: 20px;
	padding: 40px;
	border: 2px solid #444;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.1),
		0 10px 30px rgba(0, 0, 0, 0.8);
	position: relative;
	overflow: hidden;
}

/* Добавляем текстуру под металлическую панель */
.wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 2px,
		rgba(100, 100, 100, 0.05) 2px,
		rgba(100, 100, 100, 0.05) 4px
	);
	pointer-events: none;
	border-radius: 20px;
}

.header {
	display: flex;
	justify-content: center;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding-bottom: 30px;
	border-bottom: 1px solid #444;
	position: relative;
}

.header::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 10%;
	right: 10%;
	height: 1px;
	background: linear-gradient(90deg, transparent, #ff7e5f, transparent);
}

.header__message-block {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 20px;
}

.header__message-txt {
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 10px;
	line-height: 1.6;
	color: #fff;
	text-shadow: 0 0 10px rgba(255, 126, 95, 0.5);
	letter-spacing: 1px;
}

.header__function-info {
	font-size: 18px;
	font-weight: 400;
	margin-bottom: 20px;
	color: #ff7e5f;
	text-shadow: 0 0 5px rgba(170, 170, 170, 0.3);
}

.header__inputs-container {
	display: flex;
	gap: 20px;
}

.header__inputs-container input {
	padding: 15px 20px;
	font-size: 18px;
	font-weight: 500;
	border: 2px solid #555;
	border-radius: 12px;
	outline: none;
	width: 120px;
	text-align: center;
	color: #fff;
	background: linear-gradient(to bottom, #333, #222);
	box-shadow:
		inset 0 2px 5px rgba(0, 0, 0, 0.8),
		0 0 10px rgba(255, 126, 95, 0.2);
	transition: all 0.3s ease;
	position: relative;
}

.header__inputs-container input::before {
	content: '';
	position: absolute;
	top: 1px;
	left: 1px;
	right: 1px;
	bottom: 1px;
	border-radius: 10px;
	pointer-events: none;
}

.header__inputs-container input:focus {
	background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
	border-color: #ff7e5f;
	box-shadow:
		inset 0 2px 5px rgba(0, 0, 0, 0.8),
		0 0 15px rgba(255, 126, 95, 0.4);
	transform: scale(1.05);
}

.main {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 30px;
	margin-top: 20px;
}

.main__item {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: linear-gradient(145deg, #2c2c2c, #1f1f1f);
	border-radius: 18px;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.1),
		0 8px 20px rgba(0, 0, 0, 0.6);
	cursor: pointer;
	overflow: hidden;
	transition: all 0.3s ease;
	border: 2px solid #444;
	position: relative;
	height: 160px;
}

.main__item::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 40%;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent);
	border-radius: 16px 16px 0 0;
	pointer-events: none;
}

.main__item::after {
	content: '';
	position: absolute;
	top: 15px;
	right: 15px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #333;
	box-shadow:
		inset 0 1px 3px rgba(0, 0, 0, 0.8),
		0 0 5px rgba(255, 0, 0, 0);
	transition: all 0.3s ease;
}

.main__item:hover::after {
	background: #ff3300;
	box-shadow:
		inset 0 1px 3px rgba(0, 0, 0, 0.8),
		0 0 10px rgba(255, 0, 0, 0.8);
}

.main__item .item__desc {
	padding: 20px;
	background: linear-gradient(180deg, #3a3a3a, #2a2a2a);
	color: #ddd;
	font-size: 18px;
	font-weight: 600;
	text-align: center;
	border-radius: 16px 16px 0 0;
	width: 100%;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.1),
		0 1px 0 rgba(0, 0, 0, 0.8);
	transition: all 0.3s ease;
	position: relative;
	z-index: 1;
}

.main__item:hover .item__desc {
	background: linear-gradient(180deg, #ff7e5f, #d66a4d);
	color: #fff;
	text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.3),
		0 2px 0 rgba(0, 0, 0, 0.8);
}

.main__item:hover {
	transform: translateY(-5px);
	background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.1),
		0 12px 25px rgba(0, 0, 0, 0.8);
	border-color: #666;
}

.result-container {
	margin: 15px 20px 20px;
	padding: 15px;
	background: linear-gradient(145deg, #252525, #1c1c1c);
	border-radius: 10px;
	text-align: center;
	width: calc(100% - 40px);
	box-sizing: border-box;
	border: 1px solid #444;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.1),
		0 2px 10px rgba(0, 0, 0, 0.5);
}

.result-text {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 5px;
	color: #fff;
	text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.iteration-text {
	font-size: 14px;
	color: #bbb;
	text-shadow: 0 0 3px rgba(187, 187, 187, 0.3);
}

.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.85);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.modal.fade-in {
	opacity: 1;
}

.modal-content {
	background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
	border: 2px solid #444;
	padding: 30px;
	border-radius: 20px;
	text-align: center;
	width: 320px;
	box-shadow:
		0 25px 50px rgba(0, 0, 0, 0.8),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	color: #fff;
	animation: modalFadeIn 0.4s ease-out;
	border: 2px solid #555;
}

@keyframes modalFadeIn {
	0% {
		opacity: 0;
		transform: translateY(-20px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 768px) {
	.main {
		grid-template-columns: 1fr 1fr;
	}

	.container {
		padding: 15px;
	}

	.header__inputs-container input {
		font-size: 16px;
		padding: 12px 15px;
	}

	.main__item .item__desc {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.header__message-txt {
		font-size: 16px;
	}

	.main {
		grid-template-columns: 1fr;
	}

	.header__inputs-container input {
		width: 60px;
	}
}

.volt-indicator {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #333;
	box-shadow:
		inset 0 1px 3px rgba(0, 0, 0, 0.8),
		0 0 5px rgba(255, 0, 0, 0);
	margin-right: 5px;
	vertical-align: middle;
}

.volt-indicator.active {
	background: #ff3300;
	box-shadow:
		inset 0 1px 3px rgba(0, 0, 0, 0.8),
		0 0 10px rgba(255, 0, 0, 0.8);
}
