html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #121212;
  font-family: sans-serif;
  overflow: hidden;
  color: white;
}

#container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#grid-container {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

#row-labels {
  width: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  background: #1a1a1a;
  border-right: 1px solid #333;
  user-select: none;
}

#row-labels div {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 5px;
  font-size: 12px;
}

table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

td {
  border: 1px solid #2a2a2a;
  background: #1e1e1e;
  cursor: pointer;
  transition: background 0.1s;
}

td.active {
  background: #4caf50;
}

#playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: white;
  z-index: 2;
  left: 0;
  pointer-events: none;
}

#controls {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  border-top: 1px solid #333;
  padding: 10px;
  flex-wrap: wrap;
}

input[type="number"],
input[type="file"],
input[type="range"],
button,
select {
  background: #2a2a2a;
  border: 1px solid #555;
  color: white;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 14px;
}

button:hover {
  background: #4caf50;
  color: black;
}

label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

#trimModal,
#delayModal,
#reverbModal,
#distortionModal,
#bitcrusherModal {
  display: none;
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -20%);
  width: 300px;
  background: #222;
  border: 1px solid #555;
  z-index: 100;
  padding: 20px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
  border-radius: 8px;
}

#trimModal canvas {
  background: #000;
  width: 100%;
  height: 100px;
}

.slider-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#delayModal select,
#reverbModal select,
#distortionModal select,
#bitcrusherModal select {
  width: 100%;
  padding: 8px;
  margin-top: 10px;
  background: #2a2a2a;
  color: white;
  border: 1px solid #555;
  border-radius: 4px;
}
