:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #101725;
  --muted: #667085;
  --line: #d9e0ec;
  --dash: #c9d3e4;
  --blue: #3368ff;
  --blue-dark: #2452da;
  --black: #20242b;
  --danger: #c2410c;
  --ok: #047857;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 56px;
}

.intro {
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.intro h1 {
  margin: 0;
  font-size: 64px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.intro > p:last-child {
  margin: 24px 0 48px;
  color: var(--muted);
  font-size: 24px;
  line-height: 1.55;
}

.upload-card,
.result-card {
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(31, 41, 55, 0.08);
}

.upload-card {
  padding: 24px;
}

.drop-zone {
  min-height: 430px;
  border: 3px dashed var(--dash);
  border-radius: 20px;
  transition: border-color 0.16s, background 0.16s;
}

.drop-zone.dragging {
  border-color: var(--blue);
  background: #f7f9ff;
}

.drop-content {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  min-height: 424px;
  padding: 28px;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--black);
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}

.drop-title {
  margin: 8px 0 0;
  color: #242a35;
  font-size: 24px;
  font-weight: 850;
}

.drop-note {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.file-note {
  margin: -6px 0 0;
  color: var(--ok);
  font-size: 14px;
  font-weight: 700;
  word-break: break-all;
}

.primary-action,
.url-row button,
#copy-task {
  border: 0;
  border-radius: 10px;
  background: var(--black);
  color: #fff;
  font-weight: 850;
}

.primary-action {
  width: 248px;
  height: 68px;
  margin-top: 12px;
  font-size: 22px;
}

.divider {
  display: flex;
  align-items: center;
  width: min(100%, 620px);
  gap: 14px;
  color: #98a2b3;
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 12px;
  width: min(100%, 620px);
}

.url-row input {
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 16px;
  outline: none;
}

.url-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(51, 104, 255, 0.12);
}

.url-row button {
  height: 52px;
  background: var(--blue);
}

.url-row button:hover {
  background: var(--blue-dark);
}

.result-card {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 20px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#copy-task,
#refresh-task {
  min-height: 36px;
  padding: 0 12px;
  background: #eef2ff;
  color: var(--blue);
}

#refresh-task {
  background: #f2f4f7;
  color: #344054;
}

#result-title {
  font-size: 22px;
}

.progress {
  overflow: hidden;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #eef2f6;
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.2s ease;
}

.task-id-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  word-break: break-all;
}

.links {
  display: grid;
  gap: 10px;
}

.links a {
  color: var(--blue);
  font-weight: 800;
  word-break: break-all;
}

details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

summary {
  color: var(--muted);
  cursor: pointer;
}

pre {
  overflow: auto;
  max-height: 300px;
  margin: 12px 0 0;
  border-radius: 10px;
  background: #101828;
  color: #e4e7ec;
  padding: 14px;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 540px);
    padding-top: 56px;
  }

  .intro h1 {
    font-size: 42px;
  }

  .intro > p:last-child {
    margin-bottom: 32px;
    font-size: 18px;
  }

  .upload-card {
    padding: 14px;
    border-radius: 20px;
  }

  .drop-content {
    min-height: 390px;
    padding: 20px;
  }

  .drop-title {
    text-align: center;
    font-size: 21px;
  }

  .primary-action {
    width: min(100%, 260px);
  }

  .url-row {
    grid-template-columns: 1fr;
  }
}
