body {
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 20px;
}

h2 {
  margin-bottom: 20px;
}

.input-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap; /* Ensures good layout on mobile */
}

.input-container input {
  width: 50px;
  text-align: center;
  padding: 5px;
  font-size: 16px;
}

button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin-top: 15px;
}

button:hover {
  background-color: #0056b3;
}

/* Center the graph */
.graph-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

canvas {
  max-width: 90%; /* Ensures it fits on mobile */
  width: 600px;
  height: 400px;
  border: 1px solid #ddd;
}

/* MathJax-styled output */
.math-output {
  font-size: 20px;
  text-align: center;
  margin-top: 15px;
}

.home-link {
  display: inline-block;
  margin: 30px auto;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

.home-link:hover {
  background-color: #0056b3;
}

