body {
  font-family: monospace;
  margin: 2rem;
  background: #f6f6f6;
}

h1 {
  text-align: center;
}

.keyboard {
  position: relative;
  width: 1260px;
  height: 250px;
  margin: auto;
  border: 2px solid #333;
  display: flex;
  touch-action: none;
}

.white-key, .black-key {
  position: relative;
  display: inline-block;
  border: 1px solid #000;
  text-align: center;
  vertical-align: bottom;
  font-size: 14px;
  user-select: none;
}

.white-key {
  width: 60px;
  height: 250px;
  background: white;
  z-index: 1;
}

.white-key.pressed {
  background: #ccc;
}

.black-key {
  width: 40px;
  height: 150px;
  background: black;
  color: white;
  position: absolute;
  top: 0;
  z-index: 2;
}

.black-key.pressed {
  background: #555;
}

.note-label {
  position: absolute;
  bottom: 5px;
  width: 100%;
  text-align: center;
  pointer-events: none;
}

#ui {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem auto;
  max-width: 100%;
}

.tiny {
  font-size: 0.75rem;
  opacity: 0.7;
  font-style: italic;
}

.category {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1rem 2rem;
  flex: 1 1 300px; /* Mindestbreite 300px, wächst bei Platz */
  box-sizing: border-box;
  min-width: 250px;
  max-width: 280px;
}

.category h2 {
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.3rem;
}
.slider {
  margin: 1rem 0;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.1rem;
  font-size: large;
}

input[type="range"], select {
  width: 100%;
  font-family: monospace;
}

.preset-controls {
  text-align: center;
  margin: 2rem;
}

textarea {
  width: 75%;
  height: 120px;
  display: block;
  margin: 0 auto;
}

.control-button { /* Allgemeine Klasse für Buttons */
  display: block;
  margin: 1rem auto 1.5rem auto;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: none;
  background-color: #007BFF;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  max-width: 200px;
}

.control-button:hover {
  background-color: #0056b3;
}

.control-button.active { /* Stil für aktivierte Hold-Taste */
  background-color: #28a745;
}

.control-button.active:hover {
  background-color: #218838;
}

#status {
  text-align: center;
  margin-top: 1rem;
  font-weight: bold;
}

.tabs {
  display: flex;
  border-bottom: 2px solid #ccc;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  background: #f0f0f0;
}

.tab.active {
  background: white;
  border-bottom: 2px solid white;
  font-weight: bold;
}

.tab-content {
  padding: 20px;
  display: none;
}

.tab-content.active {
  display: block;
}

.button-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.preset-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.doc-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  box-sizing: border-box;
}

button {
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
}