* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* General Styles */
body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;

  width: 100%;
}

.title {
  width: 100%;
  height: 30vh;
  background-color: #9ec7f5;

  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;

  position: relative;
}

.title h1 {
  text-align: center;
  font-size: 2.5rem;
  line-height: 1;
  padding: 10px;
  
  z-index: 2;
}

#title-sim {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;

  width: 100%;
  height: 100%;
}

/* Button Styling */
button {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 1rem;
  color: white;
  background-color: #4a90e2;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #357abd;
}

input[type="checkbox"] {
  transform: scale(1.2);
}

input[type="number"]:focus {
  outline: none;
  border-color: #4a90e2;
}

.input-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  column-gap: 20px;
  padding: 20px;
  background-color: #f9f9f9;
  border-top: 1px solid #ddd;
}

.input-box label {
  font-weight: bold;
}

.input-box input[type='number'] {
  padding: 8px;
  padding-right: 2px;
  border: none;
  border-bottom: 1px solid #ccc;
  border-radius: 0;
  outline: none;
  font-size: 16px;
  width: 100%;
}

.input-box input[type='number']:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.input-row {
  display: flex;
  flex-direction: row;
  justify-content: right;
  align-items: center;
  gap: 10px;
}

h2 {
  text-align: center;
  color: #333;
  font-size: 2rem;
  margin-top: 40px;
}

footer {
  text-align: center;
  margin: 40px 0 20px;
  font-size: 0.9rem;
  color: #777;
}


.sim-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 16px;
  padding-top: 2rem;
  padding-bottom: 2rem;

  width: 90vw;
  max-width: 1200px;
}

.sim-section > * {
  display: block;
  background-color: #ffffff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 10px;

  overflow: hidden;
  width: 100% !important;  /* Ensure the canvas expands */
  height: auto !important; /* Maintain aspect ratio */
  min-width: 200px;
}

article {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

article > p {
  width: 90vw;
  max-width: 800px;
}

.sim-canvas {
  width: 100%;
  height: 40vh;
}

.sim-chart {
  width: 100%;
  min-height: calc(max(40vh, 400px));
  height: 100%;
  padding: 15px;
}

.math {
  font-size: 0.9rem;
}