* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: sans-serif;
  background: #f9f9f9;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;       
}

.container {
  width: 100%;
  padding: 0 20px; /* adjust side padding as desired */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}
h1 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-align: center;
}

#latex-input {
  width: 100%;
  height: 150px;
  padding: 0.5rem;
  font-family: monospace;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
}

#render-btn {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  background: #007acc;
  color: white;
  border: none;
  border-radius: 4px;
  margin-bottom: 1rem;
}

#render-btn:hover {
  background: #005fa3;
}

#result-container {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  min-height: 50px;
  overflow-x: auto;
  white-space: nowrap;
}

#result {
  font-size: 1.5em;
  word-wrap: break-word;
  white-space: normal;
  display: inline-block; 
}

#font-controls {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
}

#font-controls button {
  padding: 0.3rem 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  background: #f1f1f1;
  cursor: pointer;
  border-radius: 4px;
}

#font-controls button:hover {
  background: #e1e1e1;
}

/* Footer stays full width */
.footer {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  padding: 1rem 0;
  border-top: 1px solid #e0e0e0;
  margin-top: auto;
  width: 100%;
}


mjx-container[jax="SVG"],
#result svg {
  max-width: 100% !important;
  height: auto;
  display: inline-block; 
}
