*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:       #f5f4f0;
  --surface:  #ffffff;
  --border:   #ddd9d0;
  --border2:  #c8c3b8;
  --accent:   #2a5caa;
  --accent2:  #1a3d78;
  --text:     #1a1a1a;
  --muted:    #888480;
  --success:  #1a7a4a;
  --success-bg: #edf7f2;
  --success-border: #a8d9be;
  --error:    #c0392b;
  --error-bg: #fdf3f2;
  --error-border: #f0b8b3;
  --radius:   10px;
  --font-mono: 'Courier New', Courier, monospace;
  --font-body: Georgia, 'Times New Roman', serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
  background-image:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(42,92,170,0.05) 0%, transparent 70%);
}

/* ── Header ── */
.header {
  text-align: center;
  margin-bottom: 36px;
}

.header-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(42,92,170,0.35);
  background: rgba(42,92,170,0.06);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.header h1 {
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--text);
}

.header h1 span {
  color: var(--accent);
}

.header p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

/* ── Card ── */
.card {
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.06),
    0 8px 32px rgba(0,0,0,0.08),
    0 24px 64px rgba(0,0,0,0.04);
}

/* ── Steps ── */
.steps {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 0;
  width: 50%;
  height: 1px;
  background: var(--border);
}

.step:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  width: 50%;
  height: 1px;
  background: var(--border);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.step.active .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.step-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.step.active .step-label {
  color: var(--accent);
}

/* ── Upload label ── */
.upload-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Drop zone ── */
.drop-zone {
  width: 100%;
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg);
  user-select: none;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(42,92,170,0.04);
}

.drop-zone input[type="file"] {
  display: none;
}

.drop-icon {
  font-size: 30px;
  margin-bottom: 10px;
  display: block;
}

.drop-title {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 600;
}

.drop-hint {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.drop-hint code {
  color: var(--accent2);
  background: rgba(42,92,170,0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* ── File info ── */
.file-info {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 12px;
}

.file-info.show {
  display: flex;
}

.file-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.file-meta {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.file-clear {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  padding: 4px;
  transition: color 0.2s;
  border-radius: 4px;
}

.file-clear:hover {
  color: var(--error);
  background: var(--error-bg);
}

/* ── Progress ── */
.progress-wrap {
  display: none;
  margin-top: 16px;
}

.progress-wrap.show {
  display: block;
}

.progress-label {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.progress-bar-bg {
  height: 3px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 100px;
  width: 0%;
  transition: width 0.1s linear;
}

/* ── Button ── */
.btn {
  margin-top: 20px;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(42,92,170,0.25);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.btn:not(:disabled):hover {
  background: var(--accent2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(42,92,170,0.3);
}

.btn:not(:disabled):active {
  transform: translateY(0);
}

/* ── Result ── */
.result {
  display: none;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.result.show {
  display: block;
}

.result.success {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.result.error {
  border-color: var(--error-border);
  background: var(--error-bg);
}

.result-title {
  font-size: 13px;
  font-family: var(--font-mono);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.result.success .result-title {
  color: var(--success);
}

.result.error .result-title {
  color: var(--error);
}

.result-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  font-family: var(--font-mono);
}

/* ── Footer ── */
.footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  font-family: var(--font-mono);
  line-height: 1.8;
}

@media (max-width: 480px) {
  .card {
    padding: 24px 18px;
  }
}
