/* ── Layout ── */
.app-container {
  max-width: 900px;
  margin: 80px auto 2rem;
  padding: 0 1rem;
}

.subtitle {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* ── Drop zone ── */
.drop-zone {
  border: 1px dashed #fff;
  padding: 2rem 1rem;
  cursor: pointer;
  position: relative;
  text-align: center;
  margin-bottom: 1rem;
}

.drop-zone:hover,
.drop-zone.dragover {
  background: rgba(0, 168, 168, 0.25);
}

.drop-zone svg {
  width: 48px;
  height: 48px;
  fill: #fff;
  display: block;
  margin: 0 auto 0.5rem;
}

.drop-zone p {
  font-size: 0.9rem;
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* ── Options ── */
.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.option-group label {
  font-size: 0.85rem;
}

.option-group .tui-input {
  width: 100%;
}

/* ── Button row ── */
.btn-row {
  margin: 1rem 0;
}

/* ── Progress ── */
#progressWrapper {
  display: none;
  margin-top: 1rem;
}

#progressLabel {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

/* ── Error ── */
#errorMsg {
  display: none;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  color: #ff0000;
  border: 1px solid #ff0000;
  font-size: 0.9rem;
}

/* ── Results grid ── */
#results {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

#results.visible {
  display: grid;
}

/* ── Image preview ── */
.preview-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #000;
  display: block;
  margin-bottom: 0.5rem;
}

/* ── Image info ── */
.image-info {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

/* ── Download button ── */
#downloadBtn {
  display: inline-block;
  text-decoration: none;
  margin-top: 0.5rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  #results.visible {
    grid-template-columns: 1fr;
  }
}
