body {
    font-family: sans-serif;
    background: #f8f9fa;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 300px;
    justify-content: center;
}

label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

main {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
}

.canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  padding: 0.5rem;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #c9c9c9;
}

#loadingMsg {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 1.1rem;
  z-index: 1000;

}

#loadingMsg.hidden {
  display: none;
}

.method_info_box {
  position: absolute;
  top: 10px;
  right: 20px;
  width: 30%;
  background: #f7f7f7;
  border-left: 4px solid #4a90e2;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  line-height: 1.4;
  color: #333;
  max-height: 80vh;
}

.method_info_box h3 {
  margin-top: 0;
  color: #2a5ca6;
  font-size: 1.1rem;
}
.additional_options_info_box{
  position: absolute;
  top: 10px;
  left: 20px;
  width: 30%;
  background: #f7f7f7;
  border-left: 4px solid #e2934a;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  line-height: 1.4;
  color: #333;
  max-height: 80vh;
}

.additional_options_info_box h3 {
  margin-top: 0;
  color: #a6832a;
  font-size: 1.1rem;
  
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
    margin: 0;
  }

  main {
    order: 1;
  }

  .method_info_box {
    box-sizing: border-box;
    position: static;
    width: 100%;
    margin: 1rem;
    order: 2

  }

  .additional_options_info_box{    
    box-sizing: border-box;
    position: static;
    width: 100%;
    margin: 1rem;
    order: 3
  }
  footer {
    order: 4;
  }
}