body {
  font-family: "Segoe UI", sans-serif;
  background: #f4f6f8;
  margin: 0;
  padding: 2rem;
  text-align: center;
  color: #333;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #222;
}

.upload-area {
  margin-bottom: 2.5rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 700px;
  margin: 0 auto 2rem;
  gap: 1.2rem;
  justify-content: center;
}

.gallery img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border: 3px solid transparent;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.25s ease-in-out;
}

.gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.gallery img.selected {
  border-color: #2196f3;
  outline: 3px solid #1976d2;
  box-shadow: 0 0 10px rgba(25, 118, 210, 0.5);
}

.size-inputs {
  margin: 1.5rem auto;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  align-items: center;
}

.size-inputs input {
  width: 80px;
  padding: 0.5rem 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: border 0.2s;
}

.size-inputs input:focus {
  border-color: #2196f3;
  outline: none;
}

button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  background-color: #2196f3;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

button:hover {
  background-color: #1976d2;
}

.message {
  margin-top: 1.2rem;
  font-size: 1rem;
}

.message.success {
  color: #2e7d32;
}

.message.error {
  color: #d32f2f;
}

.command-box {
  margin: 1.5rem auto;
  max-width: 90%;
  text-align: left;
}

.command-box pre {
  background: #eceff1;
  padding: 1rem;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.pagination {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.pagination button {
  background-color: #e0e0e0;
  color: #333;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.pagination button:hover {
  background-color: #bdbdbd;
}
