/* General Styles */
body {
  font-family: 'Roboto', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
}

h1 {
  text-align: center;
  color: #444;
  margin: 20px 0;
  font-size: 2.5rem;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.image-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 20px;
  height: 300px; /* Adjust height as needed */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Count Field */
.image-count {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  font-weight: bold;
  color: #333;
  text-align: center;
}

/* Image Preview */
.image-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-grow: 1;
  width: 100%;
}

/* Image Container */
.image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50%;
  position: relative; /* Ensure labels are positioned relative to the image box */
}

/* Image Label */
.image-label {
  position: absolute;
  top: -20px; /* Position the label above the image */
  font-size: 0.9rem;
  font-weight: bold;
  color: #555;
  text-align: center;
  background-color: white; /* Optional: Add background for better visibility */
  padding: 2px 5px; /* Optional: Add padding for better appearance */
  border-radius: 3px; /* Optional: Add rounded corners */
  z-index: 1; /* Ensure the label appears above the image */
}

/* Image */
.image-container img {
  max-width: 100px;
  max-height: 100px;
  margin-top: 10px; /* Adjust spacing between the label and the image */
}

.placeholder {
  width: 100px;
  height: 100px;
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 12px;
  border: 1px dashed #ccc;
  border-radius: 5px;
  margin-top: 20px;
}

/* Replace Button */
.replace-button-container {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

/* Buttons */
button {
  padding: 10px 15px;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
  transform: scale(1.05);
}

#exportButton {
  background-color: #28a745;
  color: white;
}

#exportButton:hover {
  background-color: #218838;
}

.replace-button {
  background-color: #007bff;
  color: white;
}

.replace-button:hover {
  background-color: #0056b3;
}

/* Header and Footer */
header {
  background-color: #007bff;
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 1.5rem;
}

footer {
  background-color: #f1f1f1;
  color: #666;
  text-align: center;
  padding: 10px;
  margin-top: 20px;
  font-size: 0.9rem;
}

/* Hide the default file input */
.hidden-file-input {
  display: none;
}

/* Style the custom file label */
.custom-file-label {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  color: white;
  background-color: #007bff;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.custom-file-label:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* Image Resolution */
.image-resolution {
  position: absolute;
  bottom: -20px; /* Position the resolution below the image */
  font-size: 0.8rem;
  color: #666;
  text-align: center;
  margin-top: 5px;
}
