/* ===== Reset & Base Styles ===== */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background: #f7f9fc;
  color: #333;
}

h1, h2, h3 {
  font-weight: 600;
  text-align: center;
}

hr {
  border: none;
  height: 1px;
  background: #ddd;
  margin: 30px 0;
}

.info-box {
  border: .2px solid #000000;  /* black border for light mode */
  border-radius: 8px;
  padding: 15px 20px;
  max-width: 700px;
  margin: 20px auto;           /* centers the box */
  background-color: #f9f9f9;   /* subtle off-white background */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  font-size: 1rem;
  line-height: 1.5;
  color: #000000;              /* text dark for readability */
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.site-header .logo {
  width: 50px;       /* adjust as needed */
  height: 50px;
}

.site-header h1 {
  font-size: 2rem;
  color: #000000;    /* dark text for light mode */
  margin: 0;
}

.site-description {
  text-align: center;
  color: #333333;    /* standard dark gray for readability */
  font-size: 1rem;
  margin-bottom: 20px;
}


/* ===== Button Styling ===== */
button {
  background-color: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  margin: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

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

/* Active toggle button */
button.active {
  background-color: #357ab8;
}

/* ===== Button Group Centering ===== */
.button-group {
  display: flex;
  justify-content: center;
  gap: 10px;       /* space between buttons */
  flex-wrap: wrap;  /* wrap on smaller screens */
  margin: 10px 0;
}

/* ===== Sections ===== */
#drawSection,
#textSection,
#formulaContainer,
#formulaGraph {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
  margin: 20px auto;
  max-width: 650px;
}

/* ===== Canvas Styling ===== */
canvas {
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fefefe;
  display: block;
  margin: 10px auto;
}

/* ===== Textareas ===== */
textarea {
  width: 100%;
  padding: 10px;
  font-family: monospace;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: vertical;
}

/* ===== Formula Container ===== */
#formulaContainer {
  text-align: center;
  font-size: 16px;
  margin-top: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  canvas {
    width: 100% !important;
    height: auto !important;
  }
}
