* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Courier New', monospace;
	background: linear-gradient(135deg, #2c3e50, #34495e);
	color: #fff;
	padding: 20px;
	min-height: 100vh;
	touch-action: manipulation;
}

.container {
	max-width: 1400px;
	margin: 0 auto;
	background: linear-gradient(145deg, #3a3a3a, #2c2c2c);
	border-radius: 20px;
	padding: 30px;
	box-shadow: 
		0 20px 40px rgba(0, 0, 0, 0.6),
		inset 0 2px 4px rgba(255, 255, 255, 0.1),
		inset 0 -2px 4px rgba(0, 0, 0, 0.3);
	border: 2px solid #444;
	position: relative;
}

/* Hardware panel effect */
.container::before {
	content: '';
	position: absolute;
	top: 15px;
	left: 15px;
	right: 15px;
	bottom: 15px;
	border: 1px solid #555;
	border-radius: 15px;
	pointer-events: none;
}

h1 {
	text-align: center;
	margin-bottom: 30px;
	font-size: 2.2em;
	color: #ff6b35;
	text-shadow: 
		0 0 10px rgba(255, 107, 53, 0.5),
		0 2px 4px rgba(0, 0, 0, 0.8);
	font-weight: bold;
	letter-spacing: 2px;
}

.controls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 25px;
	margin-bottom: 30px;
	flex-wrap: wrap;
	background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
	padding: 20px;
	border-radius: 15px;
	box-shadow: 
		inset 0 3px 6px rgba(0, 0, 0, 0.5),
		inset 0 -1px 2px rgba(255, 255, 255, 0.1);
	border: 1px solid #333;
}

.control-group {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	background: rgba(0, 0, 0, 0.3);
	padding: 12px 18px;
	border-radius: 10px;
	border: 1px solid #444;
}

/* Hardware-style buttons */
button {
	background: linear-gradient(145deg, #4a4a4a, #2a2a2a);
	border: 2px solid #555;
	color: white;
	padding: 12px 24px;
	border-radius: 8px;
	cursor: pointer;
	font-weight: bold;
	transition: all 0.15s ease;
	box-shadow: 
		0 4px 8px rgba(0, 0, 0, 0.4),
		inset 0 1px 2px rgba(255, 255, 255, 0.1),
		inset 0 -1px 2px rgba(0, 0, 0, 0.3);
	font-size: 13px;
	user-select: none;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
	position: relative;
	overflow: hidden;
}

button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
	transition: left 0.5s;
}

button:hover::before {
	left: 100%;
}

button:hover {
	background: linear-gradient(145deg, #5a5a5a, #3a3a3a);
	transform: translateY(-1px);
	box-shadow: 
		0 6px 12px rgba(0, 0, 0, 0.5),
		inset 0 1px 2px rgba(255, 255, 255, 0.15),
		inset 0 -1px 2px rgba(0, 0, 0, 0.4);
}

button:active {
	transform: translateY(1px);
	box-shadow: 
		0 2px 4px rgba(0, 0, 0, 0.4),
		inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

button.playing {
	background: linear-gradient(145deg, #ff6b35, #e55a2b);
	border-color: #ff8c42;
	box-shadow: 
		0 4px 8px rgba(255, 107, 53, 0.4),
		inset 0 1px 2px rgba(255, 255, 255, 0.2),
		0 0 15px rgba(255, 107, 53, 0.3);
	animation: hardwarePulse 1s ease-in-out infinite alternate;
}

@keyframes hardwarePulse {
	from { 
		box-shadow: 
			0 4px 8px rgba(255, 107, 53, 0.4),
			inset 0 1px 2px rgba(255, 255, 255, 0.2),
			0 0 15px rgba(255, 107, 53, 0.3);
	}
	to { 
		box-shadow: 
			0 4px 8px rgba(255, 107, 53, 0.6),
			inset 0 1px 2px rgba(255, 255, 255, 0.3),
			0 0 25px rgba(255, 107, 53, 0.5);
	}
}

.preset-controls {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

.preset-btn {
	background: linear-gradient(145deg, #6c5ce7, #5a4fd1);
	border-color: #7d6ef0;
	font-size: 12px;
	padding: 8px 16px;
}

.preset-btn:hover {
	background: linear-gradient(145deg, #7c6cf7, #6a5fe1);
}

/* Hardware-style sliders */
input[type="range"] {
	width: 100px;
	height: 8px;
	background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
	outline: none;
	border-radius: 4px;
	border: 1px solid #333;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

input[type="range"]::-webkit-slider-thumb {
	appearance: none;
	width: 22px;
	height: 22px;
	background: linear-gradient(145deg, #ff6b35, #e55a2b);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 
		0 2px 6px rgba(0, 0, 0, 0.5),
		inset 0 1px 2px rgba(255, 255, 255, 0.2);
	border: 2px solid #ff8c42;
}

input[type="range"]::-webkit-slider-thumb:hover {
	background: linear-gradient(145deg, #ff7c45, #f56a3b);
}

/* LCD-style displays */
.bpm-display, .swing-display, .volume-display {
	background: linear-gradient(145deg, #001a00, #003300);
	color: #00ff41;
	padding: 8px 16px;
	border-radius: 6px;
	font-weight: bold;
	font-family: 'Courier New', monospace;
	min-width: 50px;
	text-align: center;
	border: 2px solid #004400;
	box-shadow: 
		inset 0 2px 4px rgba(0, 0, 0, 0.8),
		0 1px 2px rgba(0, 255, 65, 0.3);
	text-shadow: 0 0 5px rgba(0, 255, 65, 0.8);
	position: relative;
}

.bpm-display::before, .swing-display::before, .volume-display::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	right: 2px;
	height: 1px;
	background: rgba(0, 255, 65, 0.3);
}

.sequencer {
	display: grid;
	gap: 25px;
}

.track {
	background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
	border-radius: 12px;
	padding: 20px;
	border: 2px solid #444;
	box-shadow: 
		0 8px 16px rgba(0, 0, 0, 0.4),
		inset 0 1px 2px rgba(255, 255, 255, 0.05);
	position: relative;
}

.track::before {
	content: '';
	position: absolute;
	top: 8px;
	left: 8px;
	right: 8px;
	bottom: 8px;
	border: 1px solid #333;
	border-radius: 8px;
	pointer-events: none;
}

.track-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
	flex-wrap: wrap;
	gap: 15px;
	background: rgba(0, 0, 0, 0.2);
	padding: 12px;
	border-radius: 8px;
	border: 1px solid #333;
}

.track-info {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.track-name {
	font-weight: bold;
	color: #ff6b35;
	min-width: 80px;
	text-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
	font-size: 14px;
	letter-spacing: 1px;
}

.track-length-control {
	display: flex;
	align-items: center;
	gap: 6px;
}

.track-length-btn {
	background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
	border: 1px solid #555;
	color: white;
	padding: 6px 10px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 11px;
	transition: all 0.2s;
	box-shadow: 
		0 2px 4px rgba(0, 0, 0, 0.3),
		inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.track-length-btn.active {
	background: linear-gradient(145deg, #ff6b35, #e55a2b);
	border-color: #ff8c42;
	color: white;
	box-shadow: 
		0 2px 4px rgba(255, 107, 53, 0.4),
		inset 0 1px 1px rgba(255, 255, 255, 0.2),
		0 0 8px rgba(255, 107, 53, 0.3);
}

/* Hardware-style select boxes */
select {
	background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
	color: #00ff41;
	border: 2px solid #333;
	padding: 8px 12px;
	border-radius: 6px;
	cursor: pointer;
	font-family: 'Courier New', monospace;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
	text-shadow: 0 0 3px rgba(0, 255, 65, 0.6);
}

select:focus {
	border-color: #ff6b35;
	box-shadow: 
		inset 0 2px 4px rgba(0, 0, 0, 0.5),
		0 0 8px rgba(255, 107, 53, 0.3);
}

.file-upload {
	position: relative;
	overflow: hidden;
	display: inline-block;
}

.file-upload input[type=file] {
	position: absolute;
	left: -9999px;
}

.file-upload-btn {
	background: linear-gradient(145deg, #00b894, #008065);
	border-color: #00d2a4;
	font-size: 12px;
	padding: 8px 16px;
}

.file-upload-btn:hover {
	background: linear-gradient(145deg, #10c8a4, #009075);
}

.volume-control {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.volume-control input[type="range"] {
	width: 80px;
}

.steps {
	display: grid;
	gap: 4px;
	grid-template-columns: repeat(32, 1fr);
	background: rgba(0, 0, 0, 0.2);
	padding: 12px;
	border-radius: 10px;
	border: 1px solid #333;
	overflow: hidden;
}

/* Hardware-style step buttons */
.step {
	width: 28px;
	height: 28px;
	background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
	border: 2px solid #555;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.15s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 9px;
	user-select: none;
	touch-action: manipulation;
	color: #999;
	box-shadow: 
		0 2px 4px rgba(0, 0, 0, 0.3),
		inset 0 1px 1px rgba(255, 255, 255, 0.1),
		inset 0 -1px 1px rgba(0, 0, 0, 0.3);
	position: relative;
	min-width: 0;
}

.step::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	right: 2px;
	height: 1px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 2px;
}

.step.disabled {
	opacity: 0.3;
	pointer-events: none;
}

.step:hover:not(.disabled) {
	background: linear-gradient(145deg, #4a4a4a, #3a3a3a);
	transform: translateY(-1px);
	box-shadow: 
		0 4px 8px rgba(0, 0, 0, 0.4),
		inset 0 1px 1px rgba(255, 255, 255, 0.15),
		inset 0 -1px 1px rgba(0, 0, 0, 0.4);
}

.step:active {
	transform: translateY(1px);
	box-shadow: 
		0 1px 3px rgba(0, 0, 0, 0.3),
		inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.step.active {
	background: linear-gradient(145deg, #ff6b35, #e55a2b);
	border-color: #ff8c42;
	color: white;
	box-shadow: 
		0 3px 6px rgba(255, 107, 53, 0.4),
		inset 0 1px 1px rgba(255, 255, 255, 0.2),
		0 0 10px rgba(255, 107, 53, 0.3);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.step.active::after {
	background: rgba(255, 255, 255, 0.3);
}

.step.current {
	border-color: #00ff41;
	box-shadow: 
		0 3px 6px rgba(0, 255, 65, 0.4),
		inset 0 1px 1px rgba(255, 255, 255, 0.1),
		0 0 15px rgba(0, 255, 65, 0.6);
	animation: currentStepHardware 0.2s ease-in-out;
}

@keyframes currentStepHardware {
	0% { 
		box-shadow: 
			0 3px 6px rgba(0, 255, 65, 0.4),
			inset 0 1px 1px rgba(255, 255, 255, 0.1),
			0 0 15px rgba(0, 255, 65, 0.6);
	}
	50% { 
		box-shadow: 
			0 3px 6px rgba(0, 255, 65, 0.6),
			inset 0 1px 1px rgba(255, 255, 255, 0.2),
			0 0 25px rgba(0, 255, 65, 0.8);
		transform: scale(1.05);
	}
	100% { 
		box-shadow: 
			0 3px 6px rgba(0, 255, 65, 0.4),
			inset 0 1px 1px rgba(255, 255, 255, 0.1),
			0 0 15px rgba(0, 255, 65, 0.6);
	}
}

.step.beat-1 {
	border-color: #999;
}

.step.beat-2 {
	border-color: #777;
}

.step.beat-3 {
	border-color: #666;
}

.clear-btn {
	background: linear-gradient(145deg, #e74c3c, #c0392b);
	border-color: #ec7063;
	font-size: 12px;
	padding: 6px 12px;
}

.clear-btn:hover {
	background: linear-gradient(145deg, #f75c4c, #d0493b);
}

.save-load-controls {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

/* LCD-style input */
.pattern-name-input {
	background: linear-gradient(145deg, #001a00, #003300);
	color: #00ff41;
	border: 2px solid #004400;
	padding: 8px 12px;
	border-radius: 6px;
	width: 150px;
	font-family: 'Courier New', monospace;
	box-shadow: 
		inset 0 2px 4px rgba(0, 0, 0, 0.8),
		0 1px 2px rgba(0, 255, 65, 0.3);
	text-shadow: 0 0 3px rgba(0, 255, 65, 0.6);
}

.pattern-name-input:focus {
	border-color: #ff6b35;
	box-shadow: 
		inset 0 2px 4px rgba(0, 0, 0, 0.8),
		0 0 8px rgba(255, 107, 53, 0.3);
}

.pattern-name-input::placeholder {
	color: rgba(0, 255, 65, 0.5);
}

.status-message {
	position: fixed;
	top: 20px;
	right: 20px;
	background: linear-gradient(145deg, #001a00, #003300);
	color: #00ff41;
	padding: 12px 20px;
	border-radius: 8px;
	border: 2px solid #004400;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	z-index: 1000;
	font-family: 'Courier New', monospace;
	box-shadow: 
		0 4px 8px rgba(0, 0, 0, 0.5),
		inset 0 1px 2px rgba(0, 255, 65, 0.2),
		0 0 10px rgba(0, 255, 65, 0.3);
	text-shadow: 0 0 5px rgba(0, 255, 65, 0.8);
}

.status-message.show {
	transform: translateX(0);
}

/* Hardware details */
.container::after {
	content: '';
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 4px;
	background: linear-gradient(90deg, #ff6b35, #e55a2b);
	border-radius: 2px;
	box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
}

/* Add some hardware screws */
.track::after {
	content: '';
	position: absolute;
	top: 6px;
	right: 6px;
	width: 8px;
	height: 8px;
	background: radial-gradient(circle, #666 30%, #333 70%);
	border-radius: 50%;
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
	.container {
		padding: 15px;
	}
	
	.steps {
		grid-template-columns: repeat(16, 1fr);
	}
	
	.step {
		width: 26px;
		height: 26px;
		font-size: 8px;
	}
	
	.controls {
		flex-direction: column;
		gap: 15px;
	}

	.control-group {
		justify-content: center;
	}

	.track-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.track-info, .volume-control {
		width: 100%;
		justify-content: space-between;
	}

	h1 {
		font-size: 2em;
	}
}

@media (max-width: 480px) {
	.steps {
		grid-template-columns: repeat(8, 1fr);
		gap: 3px;
	}
	
	.step {
		width: 30px;
		height: 30px;
	}
	
	.control-group {
		padding: 8px 12px;
	}
}