* {
  box-sizing: border-box;
  font-size: 130%;
}
body{
  font-family: sans-serif;
  padding: 1.5rem;
  background: hsl(210, 60%, 95%);
}

.canvas-container {
  display: flex;
  gap: 10px;
  width: 100%;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* Left side: original image */
#canvasOriginal {
  width: calc(50% - 5px);
}

/* Right side: container for canvasOutput and bgImage */
.output-container {
  position: relative;
  width: calc(50% - 5px);
}

/* Canvas on the right */
#canvasOutput {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

/* Background image behind canvasOutput */
#bgImage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

button{
  display: inline-block;
  outline:none;
  border:none;
  max-width: 800px;
  min-width: 310px;
  margin: 0 auto;
  background-color: #0077cc;
  color: white;
  padding: 0.6em 1.2em;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  margin: 1rem 0;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

button:hover {
  max-width: 800px;
  min-width: 310px;
  background-color: #005fa3;
  transform: translateY(-1px);
}
p {
  max-width: 800px;
  min-width: 310px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  padding: 0rem;
  color: #123;
}
h3 {
  text-align: center;
}
h4 {
  margin-top: 3rem;
  margin-bottom: 0rem;
}
h1 {
  text-align: center;
  margin-top: 0px;
}
h2{
  text-align: center;
}
input[type="file"] {
  display: none;
}

label[for="imageInput"]{
  display: inline-block;
  max-width: 800px;
  min-width: 310px;
  margin: 0 auto;
  background-color: #0077cc;
  color: white;
  padding: 0.6em 1.2em;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  margin: 1rem 0;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

label[for="imageInput"]:hover {
  max-width: 800px;
  min-width: 310px;
  background-color: #005fa3;
  transform: translateY(-1px);
}
.input-wrapper {
  text-align: center;
  margin-bottom: 1rem;
}
.download-wrapper {
  text-align: center;
  margin-bottom: 1rem;
}
.a-wrapper{
  min-width:310px;
  max-width:800px;
  margin:0 auto;
}
a{
  min-width:100%;
  display: inline-block;
  background-color: #0077cc;
  color: white;
  padding: 0.6em 1.2em;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  margin: 1rem 0;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

a:hover {
  background-color: #005fa3;
  transform: translateY(-1px);
}