body {
  background-color: #E9F1FA;
  font-family: 'Times New Roman', Times, serif;
  margin: 0;
  padding: 20px;
  color: #2c3e50;
}

h1, h2, h3, h4 {
  color: #34495e;
}

h1 {
  font-size: 2.4rem;
  text-align: center;
}
  
h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  border-bottom: 2px solid #d5e4f3;
  padding-bottom: 0.5rem;
}
  
h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem;
}

h4 {
  font-size: 1rem;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.3rem;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #b8d3e9;
  border-radius: 4px;
  font-size: 1rem;
  margin-top: 4px;
  transition: border-color 0.2s ease;
  background-color: #ffffff;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #7cb0e3;
  box-shadow: 0 0 0 3px rgba(124, 176, 227, 0.1);
}

.examples ul {
  list-style-type: none;
  padding: 0;
}

.examples li {
  margin-bottom: 10px;
}

.examples a {
  color: #3498db;
  text-decoration: none;
}

.examples a:hover {
  text-decoration: underline;
}

#launch-button {
  margin: 0 auto;
}svg {
  background-color: #FFFFFF;
  margin: 15px auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block;
}

.sim-text, .sim-parameters {
  width: 80vw;
  max-width: 1200px;
  margin: 0 auto 20px auto;
  background-color: #FFFFFF;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sim-text p {
  text-align: left;
  line-height: 1.6;
}

.sim-parameters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "sliders restrictions"
    "modifiers restrictions"
    "scenarios scenarios";
  gap: 20px;
}

.sim-sliders {
  grid-area: sliders;
}

.sim-sliders li {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  list-style-type: none;
  text-align: left;
}

.sim-sliders label, .sim-modifiers label, .sim-restrictions label {
  margin-bottom: 8px;
}

.sim-slider {
  width: 100%;
  height: 8px;
  appearance: none;
  background: #d5e4f3;
  border-radius: 4px;
  outline: none;
}

.sim-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: #7cb0e3;
  border-radius: 50%;
  cursor: pointer;
}

.sim-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #7cb0e3;
  border-radius: 50%;
  cursor: pointer;
}

.sim-slider:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #e0e0e0;
}

.sim-slider:disabled::-webkit-slider-thumb, .sim-slider:disabled::-moz-range-thumb {
  background: #b0b0b0;
  cursor: not-allowed;
}

.sim-modifiers, .sim-restrictions, .sim-scenarios {
  grid-area: modifiers;
  padding: 15px;
  background-color: #f0f6fc;
  border-radius: 6px;
}

.sim-modifiers {
  grid-area: modifiers;
}

.sim-modifiers div {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
}

.sim-spread-item {
  display: flex;
  align-items: center;
  margin: 8px 0;
  list-style-type: none;
}

.sim-spread-item label {
  margin: 0 0 0 8px !important;
  font-weight: normal !important;
  cursor: pointer;
}

.sim-restrictions {
  grid-area: restrictions;
}

.sim-restriction-options {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 15px;
}

.sim-restriction-options > div {
  display: flex;
  flex-direction: column;
  width: 48%;
}

.sim-restriction-options input[type="checkbox"] {
  margin: 3px 5px 0 0;
  cursor: pointer;
}

.sim-restriction-options label {
  display: inline-block;
  font-weight: normal;
  cursor: pointer;
  line-height: 1.4;
  text-align: left;
}

.sim-restriction-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  width: 100%;
}

.sim-scenarios {
  grid-area: scenarios;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  margin: 20px 0;
}

.sim-scenarios label {
  margin-right: 15px;
  min-width: fit-content;
}

.sim-scenario-menu {
  padding: 8px 12px;
  border: 1px solid #b8d3e9;
  border-radius: 4px;
  font-size: 1rem;
  background-color: #ffffff;
  min-width: 250px;
}

.sim-scenario-menu:focus {
  outline: none;
  border-color: #7cb0e3;
  box-shadow: 0 0 0 3px rgba(124, 176, 227, 0.1);
}

.sim-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.sim-start-button, .sim-stop-button {
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.sim-start-button {
  background-color: #3498db;
}

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

.sim-stop-button {
  background-color: #e74c3c;
}

.sim-stop-button:hover {
  background-color: #c0392b;
}

.sim-stop-button:disabled, .sim-start-button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

[data-sim-tooltip] {
  position: relative;
  cursor: help;
}

[data-sim-tooltip]:hover::before {
  content: attr(data-sim-tooltip);
  position: absolute;
  width: 300px;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 6px;
  background-color: #34495e;
  color: white;
  font-size: 0.9rem;
  white-space: pre-wrap;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

[data-sim-tooltip]:hover::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #34495e transparent transparent transparent;
  z-index: 100;
}

.sim-legend {
  margin: 15px 0 25px;
  padding: 15px 20px;
  border-radius: 8px;
  background-color: #f0f6fc;
  font-size: 14px;
  max-width: 600px;
}

.sim-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.sim-legend-item {
  display: flex;
  align-items: center;
  margin-right: 15px;
  min-width: 100px;
}

.sim-legend-node {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 8px;
  border: 1px solid #333;
}

.sim-legend-line {
  width: 30px;
  height: 3px;
  margin-right: 8px;
}

.sim-legend-label {
  font-size: 14px;
}

.sim-legend-note {
  margin-top: 15px;
  font-style: italic;
  font-size: 12px;
  color: #7f8c8d;
}

.sim-legend-thickness {
  display: flex;
  margin-top: 10px;
  gap: 30px;
}

.sim-legend-thickness-item {
  display: flex;
  align-items: center;
}

.sim-legend-thickness-line {
  width: 30px;
  margin-right: 8px;
}

.sim-legend-thickness-label {
  font-size: 12px;
  color: #7f8c8d;
}

.info-icon {
  color: #0066cc;
  cursor: help;
  font-size: 16px;
  user-select: none;
  transition: color 0.2s;
}

.info-icon:hover {
  color: #004080;
}