body {
    font-family: sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 20px;
  }

  .back-button {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background-color: #000000;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: white;
}

.back-button:hover {
  background-color: #aaa;
}

  
  /* This wrapper keeps everything nicely aligned */
  .wrapper {
    width: 640px;
    margin: 0 auto;
    text-align: center;
  }
  
  h1 {
    margin-bottom: 20px;
  }

  canvas {
    display: block;
    margin: 0 auto 20px auto; /* top, right/left, bottom */
  }
  .canvas-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* full screen height */
  }
  .canvas-container {
    margin: 20px auto;
    display: flex;
    justify-content: center;
  }
  #fourier-series {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
  }

  


#buttonRow {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  #buttonRow button {
    padding: 8px 16px;
    font-size: 16px;
    border: 2px solid black;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s ease;
  }
  
  #start-simulation {
    background-color: #006400; /* dark green */
  }
  
  #start-simulation:hover {
    background-color: #004d00; /* darker green */
  }
  
  #clear-canvas {
    background-color: #cc0000; /* red */
  }
  
  #clear-canvas:hover {
    background-color: #990000; /* darker red */
  }