:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #18202a;
  --muted: #667085;
  --line: #d6dde6;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warning: #9f1239;
  --shadow: 0 18px 48px rgba(24, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(245, 158, 11, 0.14), transparent 36%),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.intro {
  grid-column: 1 / -1;
}

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

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 6vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.subtitle {
  max-width: 760px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 1.05rem;
}

.panel,
.result-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.drop-zone {
  display: grid;
  min-height: 170px;
  place-items: center;
  gap: 8px;
  padding: 22px;
  border: 2px dashed #aab6c4;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: #ecfdf5;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  font-size: 1.8rem;
  line-height: 1;
}

.drop-zone small,
label span {
  color: var(--muted);
  font-size: 0.86rem;
}

.control-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

select,
textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--accent-dark);
}

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

.status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.progress-area {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #d6dde6;
}

.progress-fill {
  position: relative;
  display: block;
  width: 0%;
  height: 100%;
  overflow: hidden;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.progress-fill.is-active::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  animation: progress-shine 1s linear infinite;
}

@keyframes progress-shine {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

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

.result-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

.actions {
  display: flex;
  gap: 8px;
}

.actions button {
  width: auto;
  min-height: 38px;
  color: var(--accent-dark);
  background: #dff7ef;
}

.actions button:hover:not(:disabled) {
  color: #fff;
}

#result {
  min-height: 520px;
  border-color: #c8d2de;
  background: #fbfcfe;
}

@media (max-width: 820px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .control-grid,
  .result-header,
  .actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  #result {
    min-height: 360px;
  }
}
