/* ===== 全自动接码站 · 浅色风格 ===== */
:root {
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --ink: #1B2559;
  --sub: #7A86A8;
  --line: #E5E9F5;
  --primary1: #4F6BFF;
  --primary2: #7B5CFF;
  --ok: #22C55E;
  --err: #EF4444;
  --radius: 20px;
  --shadow: 0 10px 34px rgba(31, 41, 86, .10);
  --grad: linear-gradient(135deg, var(--primary1), var(--primary2));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(640px 420px at 86% -6%, rgba(123, 92, 255, .17), transparent 62%),
    radial-gradient(540px 380px at -12% 18%, rgba(79, 107, 255, .15), transparent 62%),
    radial-gradient(520px 400px at 52% 112%, rgba(79, 107, 255, .10), transparent 62%),
    var(--bg);
}

.app {
  position: relative; z-index: 1;
  width: 100%; max-width: 430px; flex: 1;
  padding: 30px 18px 18px;
}

/* ---------- 品牌头 ---------- */
.brand { text-align: center; margin-bottom: 18px; }
.logo {
  width: 58px; height: 58px; margin: 0 auto 12px;
  border-radius: 18px; background: var(--grad);
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(79, 107, 255, .34);
}
.logo svg { width: 28px; height: 28px; }
.brand h1 { font-size: 22px; margin: 0; letter-spacing: .5px; }
.sub { color: var(--sub); font-size: 13px; margin: 7px 0 0; }

/* ---------- 步骤条 ---------- */
.steps {
  display: flex; gap: 8px; list-style: none;
  padding: 0; margin: 0 0 16px;
}
.steps li {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 4px; font-size: 12px; color: var(--sub);
  transition: all .25s ease;
}
.steps li i {
  font-style: normal; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: #EEF1FA; color: var(--sub); font-size: 11px; font-weight: 700;
  transition: all .25s ease;
}
.steps li.done i { background: #E7F8EE; color: var(--ok); }
.steps li.active {
  color: #fff; background: var(--grad); border-color: transparent;
  box-shadow: 0 6px 16px rgba(79, 107, 255, .30);
}
.steps li.active i { background: rgba(255, 255, 255, .28); color: #fff; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 20px 22px;
  margin-bottom: 14px;
  animation: fadeUp .32s ease both;
}
.card.centered { text-align: center; }
.card.centered .desc { margin-bottom: 0; }
.hidden { display: none !important; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.card h2 { margin: 0 0 6px; font-size: 18px; }
.desc { color: var(--sub); font-size: 13px; margin: 0 0 18px; line-height: 1.6; }

/* ---------- 输入框 ---------- */
.field input {
  width: 100%; height: 52px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #FAFBFF;
  padding: 0 16px; font-size: 16px; color: var(--ink);
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: #A9B3CE; }
.field input:focus {
  border-color: var(--primary1); background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 107, 255, .12);
}

/* ---------- 按钮 ---------- */
.btn {
  width: 100%; height: 52px; margin-top: 10px;
  border: none; border-radius: 14px;
  font-size: 16px; font-weight: 600; color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 22px rgba(79, 107, 255, .32);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }

/* ---------- 错误提示 ---------- */
.error { color: var(--err); font-size: 13px; min-height: 18px; margin: 8px 2px 0; line-height: 1.5; }
.hint { color: var(--sub); font-size: 12px; margin: 8px 2px 0; line-height: 1.5; }
.status .hint { margin-top: -6px; }
.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ---------- 状态区（等待/核验中） ---------- */
.status {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 20px 6px 16px; text-align: center;
}
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid #E9EDFA; border-top-color: var(--primary1);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status p { color: var(--sub); font-size: 14px; margin: 0; }

/* ---------- 已发送提示 ---------- */
.sent-hint {
  display: flex; align-items: center; gap: 6px;
  color: var(--ok); font-size: 13px; margin: 0 0 12px;
  background: #F0FBF4; border: 1px solid #D8F3E3;
  border-radius: 12px; padding: 10px 12px;
}
.sent-hint svg { width: 16px; height: 16px; flex: none; }

/* ---------- 上传区 ---------- */
.dropzone {
  display: block; border: 1.5px dashed #C9D2EC; border-radius: 16px;
  padding: 26px 14px; text-align: center; cursor: pointer;
  background: #FAFBFF; transition: border-color .2s, background .2s, transform .15s;
}
.dropzone:active { transform: scale(.995); }
.dropzone.drag { border-color: var(--primary1); background: #F0F4FF; }
.dz-inner svg { width: 36px; height: 36px; color: #B9C4E4; margin-bottom: 8px; }
.dz-inner span { display: block; font-size: 14px; color: var(--ink); margin-bottom: 5px; }
.dz-inner em { font-style: normal; font-size: 12px; color: var(--sub); }
.preview {
  max-width: 100%; max-height: 260px; border-radius: 12px; margin-top: 4px;
  box-shadow: 0 4px 16px rgba(31, 41, 86, .12);
}

.progress {
  height: 8px; border-radius: 6px; background: #EEF1FA;
  overflow: hidden; margin: 14px 0 0;
}
.progress i {
  display: block; height: 100%; width: 0;
  background: var(--grad); border-radius: 6px;
  transition: width .2s ease;
}

/* ---------- 完成动画 ---------- */
.done-check {
  width: 86px; height: 86px; margin: 4px auto 14px;
  border-radius: 50%; background: #E9F9F0;
  display: grid; place-items: center;
  animation: pop .4s ease both;
}
.done-check svg {
  width: 44px; height: 44px; color: var(--ok);
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: draw .5s .18s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop {
  from { transform: scale(.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------- 页脚 ---------- */
.foot {
  position: relative; z-index: 1;
  color: #A6AFC9; font-size: 12px;
  padding: 10px 0 calc(14px + env(safe-area-inset-bottom));
}

/* ---------- 小屏适配 ---------- */
@media (max-width: 360px) {
  .app { padding: 22px 14px 14px; }
  .card { padding: 22px 16px 18px; }
  .steps li span { display: none; }
  .steps li { gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
