.image-resizer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  color: #f0f0f0;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #222;
  border-radius: 8px;
  background: #111;
}

.drop-zone {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1 1 200px;
  border: 2px dashed #444;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  background: #0e0e0e;
  position: relative;
}

.drop-zone.dragover {
  background: #1a1a1a;
  border-color: #888;
}

.drop-zone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.size-mode label,
.size-inputs label,
.format-select label {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.format-select,
.size-mode, .size-inputs {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.size-mode label {
  flex-direction: row;
}

.size-inputs input {
  width: 80px;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid #444;
  background-color: #111;
  color: #f0f0f0;
}

#processAllBtn {
  padding: 0.5rem 1rem;
  background: #454545;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  transition: background 0.1s ease-in-out;
  height: 40px;
  margin: auto 0;
}

#processAllBtn:hover {
  background: #666;
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.preview-item {
  background: #111;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.preview-item canvas {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: auto 0;
}

.preview-item button {
  padding: 0.3rem 0.7rem;
  background: #454545;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  margin-top: 0.5rem;
}

.preview-item button:hover {
  background: #555;
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
  }
}

#dropZone p {
  pointer-events: none;
  user-select: none;
}

.remove-btn {
  position: absolute;
  color: rgb(247, 109, 109) !important;
  background: none !important;
  font-size: 20px;
  font-weight: 900;
  margin: 0 !important;
  transform: translateX(230%);
}

#formatSelect {
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid #444;
  background-color: #111;
  color: #f0f0f0;
}

.size-mode label input {
    accent-color: #ff987f;
    cursor: pointer;
}

.size-mode label input:checked + span {
    font-weight: bold;
    color: #007bff;
}

#formatSelect, #processAllBtn {
  user-select: none;
}