* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family:
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Roboto,
		"Helvetica Neue",
		Arial,
		sans-serif;
	background-color: #f5f5f5;
}

.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
}

header {
	background-color: #fff;
	padding: 30px;
	border-radius: 8px;
	margin-bottom: 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
	margin: 0 0 10px 0;
	color: #333;
	font-size: 32px;
}

header p {
	margin: 0 0 20px 0;
	color: #666;
	font-size: 16px;
	line-height: 1.5;
}

.header-links {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.header-links a {
	text-decoration: none;
}

.controls {
	background-color: #fff;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	flex-wrap: wrap;
	gap: 10px;
}

.control-header h2 {
	margin: 0;
	font-size: 18px;
	color: #333;
}

.button-group {
	display: flex;
	gap: 10px;
}

.btn {
	padding: 8px 16px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
	transform: translateY(0);
}

.btn-primary {
	background-color: #208bfe;
	color: white;
}

.btn-primary:hover {
	background-color: #0d7de8;
}

.btn-secondary {
	background-color: #6c757d;
	color: white;
}

.btn-secondary:hover {
	background-color: #5a6268;
}

#blocks-input {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", monospace;
	font-size: 13px;
	resize: vertical;
	background-color: #f8f9fa;
	color: #333;
}

#blocks-input:focus {
	outline: none;
	border-color: #208bfe;
	background-color: #fff;
}

.editor-container {
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	margin-bottom: 20px;
}

#blockly {
	display: block;
	width: 100%;
	height: 600px;
	min-height: 400px;
}

.output-section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 20px;
}

.output-panel {
	background-color: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.output-panel h2 {
	margin: 0 0 15px 0;
	font-size: 18px;
	color: #333;
}

.code-output,
.state-output {
	background-color: #1e1e1e;
	color: #d4d4d4;
	padding: 15px;
	border-radius: 4px;
	font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", monospace;
	font-size: 13px;
	line-height: 1.5;
	overflow: auto;
	max-height: 300px;
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
}

footer {
	text-align: center;
	padding: 20px;
	color: #666;
	font-size: 14px;
}

footer p {
	margin: 0;
}

footer a {
	color: #208bfe;
	text-decoration: none;
}

footer a:hover {
	text-decoration: underline;
}

@media (max-width: 900px) {
	.output-section {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.control-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.button-group {
		width: 100%;
	}

	.btn {
		flex: 1;
	}

	.header-links {
		width: 100%;
	}

	.header-links .btn {
		flex: 1;
	}
}
