:root {
  color-scheme: light;
  --blue: #2468f2;
  --blue-dark: #174bc4;
  --navy: #132c52;
  --ink: #26364d;
  --muted: #6e7f96;
  --line: #dbe5f1;
  --surface: rgba(255, 255, 255, .94);
  --success: #16a36a;
  --danger: #d94a4a;
  font-family: "MiSans", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(36, 104, 242, .18), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(33, 190, 208, .16), transparent 26%),
    #eef4fb;
}

button,
input {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
}

.back-link {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  color: var(--blue);
}

.demo-badge {
  padding: 7px 12px;
  border: 1px solid rgba(36, 104, 242, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
}

.page-shell {
  width: min(760px, calc(100% - 32px));
  margin: 7vh auto 48px;
}

.intro {
  margin-bottom: 28px;
  text-align: center;
}

.eyebrow,
.section-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 12px 0;
  color: var(--navy);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.14;
  letter-spacing: -.03em;
}

.intro p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.task-card {
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(24, 53, 96, .13);
  backdrop-filter: blur(15px);
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 28px;
  border: 1.5px dashed #b8c9dd;
  border-radius: 20px;
  background: #f7faff;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--blue);
  background: #f0f6ff;
  transform: translateY(-1px);
}

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

.file-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  border-radius: 17px;
  background: linear-gradient(145deg, #2b75ff, #174bc4);
  box-shadow: 0 12px 24px rgba(36, 104, 242, .24);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .05em;
}

.drop-zone strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--navy);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop-zone > span:last-child {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: .16s ease;
}

.primary-button {
  width: 100%;
  margin-top: 18px;
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 12px 26px rgba(36, 104, 242, .22);
  color: #fff;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(36, 104, 242, .28);
}

.primary-button:disabled {
  background: #b6c4d5;
  box-shadow: none;
  cursor: not-allowed;
}

.progress-panel {
  padding: 16px 4px 8px;
}

.progress-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.progress-heading strong {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-size: 19px;
}

#progressPercent {
  color: var(--blue);
  font-size: 28px;
  font-weight: 820;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf7;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2468f2, #23b9d2);
  box-shadow: 0 0 18px rgba(36, 104, 242, .32);
  transition: width .35s ease;
}

.step-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 18px;
  color: #93a0b2;
  font-size: 12px;
  text-align: center;
}

.step-row span.active {
  color: var(--blue);
  font-weight: 800;
}

.step-row span.complete {
  color: var(--success);
  font-weight: 750;
}

.result-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 18px;
  align-items: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e7f8f1;
  color: var(--success);
  font-size: 30px;
  font-weight: 850;
}

.result-panel h2 {
  margin: 6px 0;
  color: var(--navy);
  font-size: 24px;
}

.result-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.download-button,
.result-panel .secondary-button {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
}

.secondary-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.error-panel {
  padding: 18px;
  border: 1px solid rgba(217, 74, 74, .22);
  border-radius: 16px;
  background: #fff6f6;
}

.error-panel strong {
  color: var(--danger);
  font-size: 18px;
}

.error-panel p {
  margin: 8px 0 16px;
  color: #8d4545;
  line-height: 1.6;
}

.page-note {
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 620px) {
  .topbar {
    width: min(100% - 28px, 1080px);
    padding: 16px 0;
  }

  .page-shell {
    margin-top: 4vh;
  }

  .task-card {
    padding: 22px;
    border-radius: 21px;
  }

  .drop-zone {
    min-height: 200px;
  }

  .progress-heading {
    align-items: flex-start;
  }

  #progressPercent {
    font-size: 23px;
  }
}
