body {
  font-family: 'Poppins', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; 
  margin: 0;
  background-color: #f4f4f9;
  height: -webkit-fill-available; 
  height: fill-available;
}

.container {
  text-align: center;
  background-color: #ffffff;
  padding: 20px;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  max-width: 90%; /* Ensure the container does not overflow on mobile */
}

h1 {
  color: #333;
  font-size: 1.5em; /* Adjusted font size for mobile */
}

input[type="file"] {
  padding: 10px;
  font-size: 16px;
  margin-bottom: 20px;
  max-width: 100%; /* Make file input responsive */
}

#canvas {
  border: 2px solid #ccc;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05);
  width: 100%; /* Make canvas responsive */
  height: auto; /* Maintain aspect ratio */
}

#previewCanvas {
  border: 2px solid #ccc;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05);
  width: 100%; /* Make canvas responsive */
  height: auto; /* Maintain aspect ratio */
}

.buttons {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  margin: 5px;
  background-color: #5c67f2;
  border: none;
  border-radius: 5px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #3c4aba;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

p {
  color: #666;
  font-size: 14px;
}

#guideText {
  margin-top: 10px;
  font-size: 16px;
  color: #444;
}

#zoomCanvas {
  display: none;
  position: absolute;
  border: 2px solid #5c67f2;
  background-color: white;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

#canvas.drag-over {
  border: 3px solid #5c67f2; /* Purple border */
  box-shadow: 0 0 10px 5px rgba(92, 103, 242, 0.7); /* Glow effect */
  transition: box-shadow 0.3s ease; /* Smooth transition */
}

@media (max-width: 600px) {
  /* Adjustments for smaller mobile screens */
  h1 {
    font-size: 1.2em;
  }

  input[type="file"] {
    font-size: 14px;
  }

  button {
    font-size: 14px;
    padding: 8px 15px;
  }

  #guideText {
    font-size: 14px;
  }

  .container {
    padding: 15px;
  }
}

canvas {
  user-select: none;
  -webkit-user-select: none; /* For iOS */
  -ms-user-select: none;     /* For IE/Edge */
  -moz-user-select: none;    /* For Firefox */
}

/* Disable text selection on the whole page during interaction */
body {
  user-select: none;
  -webkit-user-select: none; /* For iOS */
  -ms-user-select: none;     /* For IE/Edge */
  -moz-user-select: none;    /* For Firefox */
}

#imageList {
  display: flex;
  flex-wrap: wrap; 
  margin-bottom: 20px; 
}

.thumbnail {
  width: 80px;          
  height: 60px;          
  margin: 5px;           
  border: 1px solid #ccc;
  background-size: cover; 
  cursor: pointer;      
}

#canvas, #previewCanvas { 
  width: 100%;
  height: auto;
}