:root {
  --bg: #111318;
  --panel: #1b1f27;
  --panel-2: #252a34;
  --text: #f7f8fb;
  --muted: #aab2c0;
  --line: #343b48;
  --accent: #f2b84b;
  --accent-dark: #b77a12;
  --danger: #ff7272;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(242, 184, 75, 0.18), transparent 34rem),
    linear-gradient(180deg, #171a21, var(--bg));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.app {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 22px 16px 36px;
}

.hero {
  padding: 18px 2px 20px;
}

.brand {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #18120a;
  font-weight: 900;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 10vw, 64px);
  line-height: 0.95;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.upload-panel {
  display: grid;
  gap: 14px;
}

.dropzone {
  min-height: 210px;
  border: 1px dashed #596273;
  border-radius: 8px;
  background: rgba(27, 31, 39, 0.86);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  cursor: pointer;
}

.dropzone input {
  display: none;
}

.drop-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 30px;
  color: var(--accent);
  margin-bottom: 10px;
}

.dropzone strong,
.dropzone small {
  display: block;
}

.dropzone small {
  margin-top: 5px;
  color: var(--muted);
}

.preview {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.actions button,
.primary,
.download {
  border: 0;
  border-radius: 8px;
  min-height: 48px;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
}

.actions button {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
}

.actions button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.primary {
  width: 100%;
  margin-top: 10px;
  background: var(--accent);
  color: #18120a;
}

.primary:disabled,
.actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status {
  min-height: 24px;
  margin: 14px 2px;
}

.status.error {
  color: var(--danger);
}

.results {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.result-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
}

.result-card h2 {
  margin: 0;
  font-size: 16px;
}

.result-card img {
  width: 100%;
  display: block;
}

.download {
  min-height: 38px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 9px 11px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 800;
}

.download {
  min-height: 38px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
}

@media (min-width: 760px) {
  .upload-panel {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}
