body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background-color: #f0f0f0;
}

.container {
  text-align: center;
  width: 80%;
  max-width: 800px;
  align-items: center;
  display: flex;
  flex-direction: column;
}

#drop-area {
  border: 2px dashed #ccc;
  border-radius: 20px;
  width: 100%;
  padding: 20px;
  margin: 20px 0;
}

#drop-area.highlight {
  border-color: purple;
}

#image-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.image-item {
  position: relative;
  width: 125px;
  height: 100px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  cursor: move;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-number {
  position: absolute;
  top: 5px;
  left: 5px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 12px;
}

#stitch-button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#stitch-button:hover {
  background-color: #45a049;
}

.image-name {
  position: absolute;
  bottom: 5px;
  left: 5px;
  right: 5px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 2px 5px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

#results {
  margin-top: 20px;
  text-align: center;
}

#stitched-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.stitched-image {
  max-width: 300px;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 5px;
}

.stitched-image img {
  max-width: 100%;
  height: auto;
}

#download-all {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#download-all:hover {
  background-color: #45a049;
}

.image-item:nth-child(even) {
  margin-left: -10px;
}

.stitch-direction {
  margin: 20px 0;
  text-align: center;
}

.toggle-container {
  margin-top: 10px;
}

.toggle-container input[type="radio"] {
  margin: 0 5px 0 15px;
}

.toggle-container input[type="radio"]:first-child {
  margin-left: 0;
}

.toggle-container label {
  cursor: pointer;
}
