* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

body {
    /* background 已移除：底色由 html 提供，body 刷背景会盖住 body::before 的极光色雾层 */
    min-height: 100vh;
    padding: 56px 24px 60px;
    display: flex;
    justify-content: center;
}

.wrap {
    width: 800px;
    max-width: 100%;
}

/* ---- 头部 ---- */
.head { text-align: center; margin-bottom: 30px; }
.head h1 {
    font-size: 27px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: .5px;
}
.head p { font-size: 14px; color: #94a3b8; margin-top: 9px; }

/* ---- 步骤卡 ---- */
.card {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 20px;
    padding: 28px 34px 28px;
    box-shadow: 0 10px 34px -14px rgba(23, 52, 99, .1);
}

.step { display: flex; gap: 20px; }
.step + .step { margin-top: 34px; }

.rail { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.rail .num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #eef4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rail .num svg { display: block; }
.rail .line { flex: 1; width: 0; border-left: 2px dashed #d8e0ea; margin-top: 6px; }

.step .body { flex: 1; min-width: 0; padding-bottom: 4px; }

.lab { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.lab b { font-size: 16px; color: #0f172a; font-weight: 600; }
.lab span { font-size: 12.5px; color: #94a3b8; }

.box {
    position: relative;
    border: 1.5px dashed #d8e0ea;
    border-radius: 14px;
    background: #fafcfe;
    transition: border-color .2s, box-shadow .2s;
}
.box.dragover { border-color: #3b82f6; background: #eff6ff; }
.box:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }

.up {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    color: #3b82f6;
    background: #eef4ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 4px 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: background .15s;
    z-index: 1;
}
.up:hover { background: #dbeafe; }

.text-input {
    display: block;
    width: 100%;
    height: 170px;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    padding: 16px 18px;
    font: 13px/1.75 Consolas, 'JetBrains Mono', monospace;
    color: #44546b;
    border-radius: 14px;
}
.text-input::placeholder { color: #9dabbd; }

.file-input { display: none; }

/* ---- 操作区 ---- */
.actions { display: flex; justify-content: center; gap: 12px; margin-top: 34px; }
.btn {
    height: 42px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: box-shadow .2s, opacity .2s;
    letter-spacing: .3px;
}
.btn.primary {
    padding: 0 38px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 6px 16px -5px rgba(47, 111, 240, .5);
}
.btn.primary:hover { box-shadow: 0 10px 22px -5px rgba(47, 111, 240, .6); }
.btn.primary:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn.ghost {
    padding: 0 24px;
    background: #fff;
    border: 1.5px solid #d8e0ea;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 500;
}
.btn.ghost:hover { border-color: #cbd5e1; color: #44546b; }

/* ---- 加载 ---- */
.loading { display: none; text-align: center; padding: 10px 0 2px; }
.loading p { color: #0f172a; font-weight: 450; font-size: 14px; }
.spinner {
    border: 3.5px solid rgba(37, 99, 235, .12);
    border-radius: 50%;
    border-top-color: #3b82f6;
    width: 28px;
    height: 28px;
    animation: spin .9s linear infinite;
    margin: 0 auto 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 错误 ---- */
.error-message {
    color: #e54545;
    background: rgba(229, 69, 69, .04);
    padding: 12px 18px;
    border-radius: 10px;
    margin-top: 18px;
    display: none;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(229, 69, 69, .1);
    font-size: 14px;
}
.error-message svg { flex-shrink: 0; }

/* ---- 结果条 ---- */
.result-area { display: none; margin-top: 12px; }
.match-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 14px;
}
.match-result b { font-size: 14px; }
.match-result .ok {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.match-success { background: #f2faf6; border: 1px solid #e7f7f0; }
.match-success b { color: #16a34a; }
.match-success span { color: #16a34a; }
.match-success .ok { background: #16a34a; }
.match-failure { background: #fef4f4; border: 1px solid #fbd9d9; }
.match-failure b { color: #c73a3a; }
.match-failure span { color: #d98181; }
.match-failure .ok { background: #e54545; }

/* ---- 隐私说明 ---- */
.privacy-note {
    text-align: center;
    font-size: 12px;
    color: #a9b4c4;
    margin-top: 16px;
}

/* ---- 移动端 ---- */
@media (max-width: 640px) {
    body { padding: 72px 14px 40px; }
    /* 图标移到左上角，输入框占满整行 */
    .step { position: relative; }
    .rail { position: absolute; top: 2px; left: 0; }
    .rail .line { display: none; }
    .rail .num { width: 28px; height: 28px; }
    .rail .num svg { width: 14px; height: 14px; }
    .lab { padding-left: 40px; }
    .rail { top: -4px; }
    .text-input { padding-top: 44px; }
    .box.out .text-input { padding-top: 16px; }
    .card { padding: 20px 16px 18px; border-radius: 16px; }
    .head h1 { font-size: 19px; }
    .text-input { height: 150px; font-size: 12px; }
    .actions { flex-direction: column; }
    .btn { width: 100%; }
    .match-result { flex-wrap: wrap; }
}
