body {
  padding: 0;
  margin: 0;
  width: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #f5f5f5;
  height: 100vh;
  overflow: hidden;
}

.container {
  height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 1.5rem;
  background-color: #f5f5f5;
}

.header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
}

#searchButton {
  font-size: 1rem;
  border: none;
  padding: 0.75rem 1.5rem;
  background-color: #3498db;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#searchButton:hover {
  background-color: #2980b9;
  transform: translateY(-1px);
}

.sensor-panel, .control-panel {
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow-y: auto;
}

.property {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #2c3e50;
}

.value {
  color: #3498db;
  font-weight: 600;
  margin-left: 0.5rem;
}

.matrix-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.25rem;
  max-width: 250px;
  margin: 1rem 0;
}

.matrixCell {
  position: relative;
  aspect-ratio: 1;
}

.matrixCell input[type=checkbox] {
  display: none;
}

.matrixCell label {
  cursor: pointer;
  position: absolute;
  inset: 0;
  background-color: white;
  border: 2px solid #34495e;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.matrixCell label:hover {
  background-color: #ff7675;
  transform: scale(1.05);
}

.matrixCell input[type=checkbox]:checked + label {
  background-color: #e74c3c;
  border-color: #c0392b;
}

.text-control {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

input[type=text] {
  flex: 1;
  font-size: 1rem;
  border: 2px solid #bdc3c7;
  border-radius: 6px;
  padding: 0.5rem;
  transition: border-color 0.3s ease;
}

input[type=text]:focus {
  border-color: #3498db;
  outline: none;
}

button {
  font-size: 1rem;
  border: none;
  padding: 0.5rem 1rem;
  background-color: #3498db;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #2980b9;
}

.midi-control {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.midi-control input[type="file"] {
  padding: 0.5rem;
  border: 2px dashed #bdc3c7;
  border-radius: 6px;
  cursor: pointer;
}

.track-result {
  margin: 1rem 0;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.track-result h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.music-string {
  margin-top: 0.5rem;
}

.music-string textarea {
  width: 100%;
  min-height: 60px;
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
  resize: vertical;
  background-color: white;
}

.play-button {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #4CAF50;
}

.play-button:hover {
  background-color: #45a049;
}

.progress-container {
  display: none;
  margin-top: 0.5rem;
  background-color: #f0f0f0;
  border-radius: 4px;
  padding: 2px;
  position: relative;
  height: 20px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background-color: #4CAF50;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-size: 12px;
  font-weight: 600;
}.progress-container {
  display: none;
  margin-top: 0.5rem;
  background-color: #f0f0f0;
  border-radius: 4px;
  padding: 2px;
  position: relative;
  height: 20px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background-color: #4CAF50;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-size: 12px;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }

  .header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .sensor-panel, .control-panel {
    max-height: none;
  }
}

