* {
  box-sizing: border-box;
}
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 100vh;
}

/* Left Panel */
#leftPanel {
  position: fixed;
  left: 0;
  top: 0;
  width: 320px;
  height: 100vh;
  background: #f5f5f5;
  color: #333;
  padding: 20px;
  overflow-y: auto;
  z-index: 999;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  border-right: 1px solid #ddd;
}
#leftPanel h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.3em;
  border-bottom: 2px solid #ccc;
  padding-bottom: 10px;
}
#leftPanel h3 {
  color: #555;
  font-size: 1.1em;
  margin-top: 25px;
  margin-bottom: 12px;
}
#leftPanel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  color: #333;
}
#leftPanel label span:first-child {
  font-weight: 500;
  font-size: 0.95em;
}
#leftPanel input[type="range"] {
  width: 100%;
  accent-color: #3498db;
}
#leftPanel .value-display {
  color: #3498db;
  font-weight: bold;
  font-size: 1.1em;
  margin-top: 4px;
}
#leftPanel .description {
  margin: 4px 0 0 0;
  color: #666;
  font-size: 0.85em;
  line-height: 1.4;
}
#leftPanel details {
  margin-top: 20px;
}
#leftPanel summary {
  cursor: pointer;
  margin-bottom: 12px;
  color: #1565c0;
  font-weight: 500;
  padding: 8px;
  background: #e3e3e3;
  border-radius: 4px;
}
#leftPanel summary:hover {
  background: #d0d0d0;
}

/* Main Content */
#mainContent {
  flex: 1;
  padding: 20px;
  margin-left: 320px;
  background: white;
  min-height: 100vh;
}

#mainContent h1 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5em;
  border-bottom: 2px solid #ccc;
  padding-bottom: 10px;
}

#mainContent h2 {
  color: #333;
  font-size: 1.3em;
}

#mainContent h3 {
  color: #555;
  font-size: 1.1em;
}

label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
input[type="range"],
input[type="number"] {
  width: 150px;
}
#visualizer {
  margin: 20px 0;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 8px;
}
#visualizer h2 {
  margin-top: 0;
  margin-bottom: 15px;
}
.graph-container {
  position: relative;
  height: 300px;
  background: white;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.stats-container {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
  gap: 10px;
}
.stat-box {
  flex: 1;
  background: white;
  padding: 12px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
}
.stat-label {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 4px;
  font-weight: 500;
}
.stat-value {
  font-size: 1.2em;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
}
.stat-value.input {
  color: #3498db;
}
.stat-value.output {
  color: #e74c3c;
}
.stat-value.reduction {
  color: #27ae60;
}
.toggle-button {
  padding: 12px 24px;
  font-size: 1em;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 15px 10px 15px 0;
}
.toggle-button.enabled {
  background: #27ae60;
  color: white;
}
.toggle-button.enabled:hover {
  background: #229954;
}
.toggle-button.disabled {
  background: #bdc3c7;
  color: #7f8c8d;
}
.toggle-button.disabled:hover {
  background: #bdc3c7;
  cursor: not-allowed;
}

/* Specific button styles */
#toggleProcessing.disabled {
  background: #e74c3c;
  color: white;
}
#toggleProcessing.disabled:hover {
  background: #c0392b;
  cursor: pointer;
}

#stopRecording.enabled {
  background: #3498db;
}
#stopRecording.enabled:hover {
  background: #2980b9;
}

#resetChart {
  background: #e67e22;
  color: white;
}
#resetChart:hover {
  background: #d35400;
}

#resetDefaults {
  background: #3498db;
  color: white;
}
#resetDefaults:hover {
  background: #2980b9;
}
