body {
  margin: 0;
  background: #f0f0f0;
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

h4 {
  Margin-top: 0.5em;
  margin-bottom: 0.3em;
}

label {
  font-weight: bold;
}

#layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}

#simWrapper {
  width: 900px;
  height: 900px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
}

#container {
  background: #ffffff;
  border: 3px solid #333;
  overflow: hidden;
  width: 600px;
  height: 600px;
  position: relative;
}

.spriteWrapper {
  position: absolute;
  overflow: visible;
  pointer-events: auto;
}

.sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

#controls {
  background: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  border: 2px solid #333;
  width: 280px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 20px;
}

.slider {
  height: 25px;
}

.sliderLabels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: bold;
  margin-top: 2px;
  margin-bottom:0px;
  color: #333;
}

.sliderTicks {
  display: flex;
  justify-content: space-between;
  margin: -11px 7px 0px 10px;
  font-weight: bold;
  font-size: 10px;
  color: #000;
  line-height: 1;
}

.sliderTicks span {
  user-select: none;
}

#energySlider, #sizeSlider {
  width: 100%;
}

#pressureBox, #molPctBox {
  margin-top: 15px;
}

#pressureValue {
  font-weight: bold;
  margin-bottom: 5px;
  text-align: center;
}

#molPct {
  font-weight: bold;
  margin-bottom: 5px;
  text-align: left;
}

#pressureBar {
  width: 100%;
  height: 18px;
  background: #ddd;
  border: 1px solid #333;
  border-radius: 4px;
  overflow: hidden;
}

#pressureFill {
  height: 100%;
  width: 0%;
  background: #ff4444;
  transition: width 0.1s linear;
}

.molRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
}

.molRow label {
  flex: 1;
  margin-left: 8px;
}

.molRow input {
  width: 60px;
}

.soundRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 3px 0;
}

.soundRow label {
  flex: 1;
  margin-left: 10px;
}

.soundRow input {
  width: 60px;
}

.swatch {
  width: 22px;
  height: 22px;
  border: 1px solid black;
  border-radius: 4px;
}

#pauseBtn {
  margin-top: 10px;
  width: 100%;
  padding: 6px;
  font-weight: bold;
  font-size: 1em;
}

