main {
	padding: 2rem 1.5rem 3rem;
}

.tutorial {
	background: rgba(79, 124, 255, 0.08);
	border: 1px solid rgba(79, 124, 255, 0.2);
	border-radius: 12px;
	padding: 1.5rem;
	margin-bottom: 2rem;
	color: #fff;
}

.tutorial h2 {
	margin: 0 0 1rem 0;
	font-size: 1.2rem;
	color: #4f7cff;
}

.tutorial p {
	margin: 0 0 1rem 0;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
}

.tutorial ul {
	margin: 0;
	padding-left: 1.5rem;
	list-style: none;
}

.tutorial li {
	margin: 0.5rem 0;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
	position: relative;
	padding-left: 1rem;
}

.tutorial li:before {
	content: "▸";
	position: absolute;
	left: 0;
	color: #4f7cff;
}

.container {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 2rem;
	align-items: start;
}

.canvas-wrapper {
	background: #0e0e13;
	border-radius: 16px;
	padding: 1rem;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	min-height: 420px;
}

#liveCanvas {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 12px;
	background: radial-gradient(circle at top, #1b1b2a, #08080d 70%);
}

.control-panel {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.control-group {
	background: rgba(12, 12, 18, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.control-group h3 {
	margin: 0;
	font-size: 1.1rem;
	letter-spacing: 0.5px;
}

.field-label {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.6);
}

.button-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

input {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #fff;
	border-radius: 10px;
	padding: 0.6rem 0.75rem;
	font-size: 0.95rem;
	width: 100%;
}

input:focus {
	outline: none;
	border-color: rgba(122, 158, 255, 0.8);
	box-shadow: 0 0 0 3px rgba(122, 158, 255, 0.2);
}

button {
	border: none;
	border-radius: 10px;
	padding: 0.65rem 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.1s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.primary-btn {
	background: linear-gradient(135deg, #4f7cff, #3b5dff);
	color: #fff;
	box-shadow: 0 12px 22px rgba(63, 96, 255, 0.3);
}

.danger-btn {
	background: linear-gradient(135deg, #ff4b4b, #d93434);
	color: #fff;
}

.ghost-btn {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.15);
}

.stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
}

.stat {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 8px;
	padding: 0.45rem 0.6rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.85rem;
}

.stat-label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.55);
}

.hint {
	margin: 0;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.7);
}

.input-control {
	display: grid;
	gap: 0.5rem;
}

.input-group {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.5rem;
}

.input-btn {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 1.1rem;
}

.input-btn:active {
	transform: scale(0.96);
}

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

	.canvas-wrapper {
		min-height: 360px;
	}
}

@media (max-width: 640px) {
	main {
		padding: 1.5rem 1rem 2.5rem;
	}

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