body {
    font-family: sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.tb303-container {
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
}

.panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 800px;
}

.control-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
}

.knob-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5px;
    color: #fff;
}

.knob-group label {
  text-align: center;
    font-size: 0.8rem;
    margin-bottom: 2px;
}


.knob {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: gray;
    border: 2px solid black;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    position: relative;
    margin-top: 5px;
}

.knob::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 10px;
    background-color: black;
    transform: translate(-50%, -50%) rotate(0deg);
}

.switch {
  position: relative;
  width: 40px;
  height: 20px;
  background-color: #666;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease;
  margin-top: 5px;
}

.switch-handle {
  width: 18px;
  height: 18px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  left: 1px;
  transition: left 0.3s ease;
}

.switch.active {
    background-color: #2ecc71;
}

.switch.active .switch-handle {
   left: 21px;
}

.sequencer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
}

.step-buttons {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.step-button {
   background-color: #555;
   color: #fff;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
    position: relative;
}

.step-button.active {
   background-color: #2ecc71;
}
.step-button.current{
  background-color: #3498db;
}

.step-button.long::after {
  content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 4px;
    background-color: #fff;
    border-radius: 2px;
}
.step-button.accent::before {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ffcc00;
}

.mode-buttons {
    display: flex;
    gap: 10px;
}
.mode-button{
  background-color: #555;
   color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.mode-button.active {
    background-color: #3498db;
}

.keyboard {
    display: flex;
    margin-top: 20px;
    padding: 10px;
    border: 2px solid #444;
    border-radius: 5px;
    background-color: #222;
}

.key {
    height: 40px;
    background-color: #eee;
    margin: 2px;
    border-radius: 3px;
    cursor: pointer;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
     transition: background-color 0.2s ease;
}

.key:active, .key.active {
    background-color: #ddd;
}

.key:nth-child(2n+1) {
 background-color: #fff;
}