:root {
  color-scheme: dark;
  --bg: #111418;
  --panel: #1b2027;
  --panel-soft: #242b34;
  --text: #f7f1e8;
  --muted: #a9b1bb;
  --accent: #29d3c3;
  --accent-strong: #ff4f7b;
  --line: #343d49;
  --danger: #ff7a7a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(41, 211, 195, 0.18), transparent 34rem), var(--bg);
  color: var(--text);
}

.shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.panel {
  background: rgba(27, 32, 39, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.heading {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.form {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
button {
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  padding: 0 14px;
}

button {
  border: 0;
  padding: 0 18px;
  background: var(--accent);
  color: #071211;
  font-weight: 800;
  cursor: pointer;
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.48;
}

#download {
  background: var(--accent-strong);
  color: white;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.status,
.error,
.warning,
.progress {
  margin-top: 18px;
  border-radius: 8px;
  padding: 12px 14px;
}

.status {
  background: rgba(41, 211, 195, 0.12);
  color: #b8fff8;
}

.error {
  background: rgba(255, 122, 122, 0.12);
  color: var(--danger);
}

.warning {
  background: rgba(255, 196, 87, 0.12);
  color: #ffd78a;
}

.progress {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
  font-size: 0.94rem;
}

.progress-label strong {
  color: var(--accent);
}

.progress-track {
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #101319;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.35s ease;
}

.result {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 22px;
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.result img {
  width: 100%;
  aspect-ratio: 9 / 12;
  object-fit: cover;
  border-radius: 8px;
  background: var(--panel-soft);
}

dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  text-align: right;
}

.notice {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 20px, 980px);
    padding: 20px 0;
  }

  .grid,
  .result {
    grid-template-columns: 1fr;
  }

  .actions button {
    width: 100%;
  }
}
