:root {
  --bg: #0f172a;
  --bg2: #1e293b;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --line: #e5e7eb;
  --danger: #dc2626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg), var(--bg2));
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 32px;
}
.page.center { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.hero { text-align: center; color: #fff; margin-bottom: 28px; }
.hero .badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .08em;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  color: #c7d2fe;
  margin-bottom: 14px;
}
.hero h1 { margin: 0 0 8px; font-size: 30px; }
.hero p { margin: 0; color: #cbd5e1; font-size: 14px; }

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 34px 16px;
  text-align: center;
  cursor: pointer;
  transition: .2s ease;
  outline: none;
}
.drop-zone:hover, .drop-zone:focus, .drop-zone.dragover {
  border-color: var(--primary);
  background: #eef2ff;
}
.drop-icon {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.drop-title { margin: 0 0 4px; font-weight: 600; }
.drop-hint { margin: 0; color: var(--muted); font-size: 13px; word-break: break-all; }

.field { margin-top: 20px; }
.field label, .link-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}
.field-hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: .15s ease;
  font-family: inherit;
}
.btn.primary { background: var(--primary); color: #fff; width: 100%; margin-top: 22px; }
.btn.primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #eef2ff; color: var(--primary); white-space: nowrap; }
.btn.ghost:hover { background: #e0e7ff; }
.btn.outline { background: #fff; color: var(--muted); border: 1px solid var(--line); width: 100%; margin-top: 18px; }
.btn.outline:hover { color: var(--text); border-color: #9ca3af; }

.progress-wrap { margin-top: 18px; }
.progress-bar { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--primary); transition: width .2s ease; }
.progress-text { margin: 6px 0 0; font-size: 12px; color: var(--muted); text-align: right; }

.error { color: var(--danger); font-size: 13px; margin: 14px 0 0; }

.result { text-align: center; }
.success-mark {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 50%; background: #dcfce7; color: #16a34a;
  display: flex; align-items: center; justify-content: center;
}
.result h2 { margin: 0 0 6px; }
.result-file { margin: 0 0 2px; font-weight: 600; word-break: break-all; }
.result-meta { margin: 0 0 22px; font-size: 12px; color: var(--muted); }
.link-label { text-align: left; }
.link-row { display: flex; gap: 8px; }
.link-row input {
  flex: 1; min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  background: #f9fafb;
}
.warn {
  font-size: 12px; color: #b45309; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 8px;
  padding: 10px 12px; margin: 16px 0 0; text-align: left;
}

.foot { text-align: center; color: rgba(255,255,255,.45); font-size: 12px; margin-top: 24px; }

.gone { text-align: center; }
.gone-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  border-radius: 50%; background: #f3f4f6; color: #9ca3af;
  font-size: 26px; display: flex; align-items: center; justify-content: center;
}
.gone h1 { font-size: 22px; margin: 0 0 8px; }
.gone p { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.gone .btn.primary { margin-top: 0; }
