:root {
  --bg: #10100f;
  --panel: #191a1c;
  --panel-2: #202226;
  --line: #33363d;
  --text: #f4f1e8;
  --muted: #aaa59a;
  --accent: #f5ff5f;
  --accent-2: #6ee7f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(135deg, rgba(245, 255, 95, 0.08), transparent 32%),
    radial-gradient(circle at top right, rgba(110, 231, 242, 0.1), transparent 28%),
    var(--bg);
  color: var(--text);
}

main {
  width: min(1180px, calc(100vw - 32px));
  margin: 28px auto 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(245, 255, 95, 0.65);
  background: #111112;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 0.95;
}

h2 {
  font-size: 18px;
}

form {
  margin: 0;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
}

.panel,
.output-panel {
  border: 1px solid var(--line);
  background: rgba(25, 26, 28, 0.94);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.panel {
  padding: 18px;
}

.panel-head,
.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.step {
  display: inline-grid;
  min-width: 34px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(245, 255, 95, 0.55);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.primary-panel,
.side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  background: #111214;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(245, 255, 95, 0.78);
  box-shadow: 0 0 0 3px rgba(245, 255, 95, 0.1);
}

input[type="file"] {
  padding: 11px;
  color: var(--muted);
}

textarea {
  resize: vertical;
  min-height: 188px;
  line-height: 1.5;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.check input {
  width: 18px;
  min-height: auto;
  height: 18px;
  accent-color: var(--accent);
}

button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.secondary-action,
.ghost-action,
.main-action {
  width: 100%;
  min-height: 46px;
}

.secondary-action {
  background: #2a2d33;
  color: var(--text);
}

.ghost-action {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
}

.main-action {
  background: var(--accent);
  color: #111112;
}

.motion-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(110, 231, 242, 0.28);
  background: linear-gradient(135deg, rgba(110, 231, 242, 0.1), rgba(255, 255, 255, 0.03));
}

.motion-card span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.motion-card strong {
  font-size: 17px;
}

.motion-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.motion-card.muted {
  border-color: rgba(245, 255, 95, 0.24);
  background: rgba(245, 255, 95, 0.05);
}

.motion-card.muted span {
  color: var(--accent);
}

.lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lab-grid label {
  gap: 6px;
  font-size: 12px;
}

.lab-grid select {
  min-height: 38px;
  padding: 8px 9px;
  font-size: 13px;
}

.output-panel {
  margin-top: 14px;
  padding: 18px;
}

#status {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

#downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
  margin-bottom: 12px;
}

#downloads a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--accent);
  padding: 0 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

#result {
  width: 100%;
  min-height: 280px;
  background: #0e0f11;
}

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  #status {
    text-align: left;
  }
}
