body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  margin: 0;
  padding: 20px;
}

#title {
  margin-top: 10px;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 32px;
  letter-spacing: normal;
  color: #ffffff;
  text-shadow: none;
}

.controls {
  max-width: 960px;
  margin: 0 auto;
  padding: 25px 30px;
  background-color: #1e1e1e;
  border-bottom: none;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 100, 255, 0.3);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ccc;
}

.slider-container label {
  font-weight: bold;
  margin-bottom: 6px;
}

input[type="range"] {
  width: 150px;
  accent-color: #64b5f6;
  background-color: #333;
  border-radius: 4px;
}

canvas {
  display: block;
  margin: 20px auto;
  border: 2px solid #64b5f6;
  border-radius: 6px;
  background-color: #121212;
}

.buttons-container {
  margin: 20px auto 40px auto;
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.buttons-container button {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  background-color: #64b5f6;
  border: none;
  border-radius: 6px;
  color: #121212;
  transition: background-color 0.2s ease-in-out;
}

.buttons-container button:hover {
  background-color: #90caf9;
}

.buttons-container button:focus {
  outline: none;
}

/* Labels for Object A sliders — kept red so the two objects stay
   visually distinct from each other, just a slightly softer red
   that sits better against the rest of the palette */
.slider-container:nth-child(1) label,
.slider-container:nth-child(2) label {
  color: #e57373;
}

/* Labels for Object B sliders — replaced the saturated blue with
   the site's actual accent blue so it doesn't clash with buttons/sliders */
.slider-container:nth-child(3) label,
.slider-container:nth-child(4) label {
  color: #64b5f6;
}

#explanation-panel {
  max-width: 800px;
  margin: 20px auto 40px auto;
  padding: 25px;
  background-color: #1e1e1e;
  border: none;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 100, 255, 0.3);
  color: #ccc;
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  position: relative;
}

#explanation-panel h2 {
  color: #90caf9;
  margin-top: 0;
}

#explanation-panel code {
  background-color: #2a2a2a;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: #90caf9;
}

#close-explanation {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  color: #bbb;
  font-size: 1.2rem;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}
#close-explanation:hover {
  color: #fff;
}
