body {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

.container {
  max-width: 800px; /* Increased width to accommodate buttons */
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.header {
  display: flex;
  justify-content: center; /* Center the title */
  align-items: center;
  width: 100%;
  max-width: 800px;
}

.header h1 {
  margin-bottom: 10px; /* Add margin below the title */
}

.sequencer-container { /* Styles for the sequencer and buttons container */
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.sequencer {
  display: grid;
  grid-template-columns: repeat(8, 1fr); /* 8 columns */
  gap: 10px;
  border: 2px solid #ccc;
  padding: 20px;
  width: 100%;
  max-width: 400px;
  overflow-x: auto;
}

.row {
  display: flex; /* Use flexbox for the row */
  align-items: center;
}

.step {
  width: 50px;
  height: 50px;
  background-color: #eee;
  border: 2px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.step.active {
  background-color: #007bff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.label {
  margin-right: 15px;
  font-weight: bold;
  width: 80px; /* Fixed width for the labels */
}

.buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.play-button, 
.stop-button,
.save-button, 
.load-button, 
.clear-button { 
  background-color: #4CAF50; /* Green */
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px; /* Reduced margin */
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.play-button:hover,
.save-button:hover, 
.load-button:hover, 
.clear-button:hover {
  background-color: #3e8e41; /* Darker green on hover */
}

.stop-button {
  background-color: #f44336; /* Red */
}

.stop-button:hover {
  background-color: #da190b; /* Darker red on hover */
}

.clear-button {
  background-color: #008CBA; /* Blue */
}

.clear-button:hover {
  background-color: #006894; /* Darker blue on hover */
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px; 
  margin-bottom: 40px;
}

.control {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.control label {
  margin-bottom: 5px;
}

.control input[type="range"] {
  width: 200px;
}

.instrument-buttons {
  display: flex;
  flex-direction: column; /* Arrange buttons vertically */
  gap: 10px;
}

.instrument-buttons button {
  background-color: #eee;
  border: 2px solid #ddd;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
}

.sound-design-control { /* Style for the sound design control */
  display: flex;
  justify-content: center; 
  align-items: center; 
  margin-bottom: 20px; 
}

.sound-design-control label {
  margin-right: 10px; 
}

/* Media query for smaller screens */
@media (max-width: 500px) {
  .step {
    width: 40px;
    height: 40px;
  }
  .sequencer-container {
    flex-direction: column; /* Stack sequencer and buttons vertically */
    align-items: center; /* Center the elements */
  }
}