/* ============================================
   用户端移动端样式 - Glassmorphism
   ============================================ */

.user-body {
    min-height: 100vh;
    background: linear-gradient(225deg, #DBEAFE 0%, #E0E7FF 50%, #EDE9FE 100%);
    position: relative;
    overflow-x: hidden;
}

/* Background Blobs */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}
.blob-1 { width: 250px; height: 250px; background: rgba(147,197,253,0.3); top: -60px; left: -60px; }
.blob-2 { width: 200px; height: 200px; background: rgba(167,139,250,0.3); bottom: -40px; right: -40px; }

.page-wrapper {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    min-height: 100vh;
}

/* ---- Glass Card ---- */
.glass-card {
    background: var(--glass-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 24px 20px;
}

/* ---- Activate Page ---- */
.activate-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
    gap: 20px;
}
.activate-icon {
    width: 72px; height: 72px;
    background: linear-gradient(180deg, #2563EB, #6366F1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(37,99,235,0.3);
}
.activate-icon svg { width: 32px; height: 32px; color: #fff; }
.activate-title { font-size: 28px; font-weight: 700; color: var(--text-primary); }
.activate-subtitle { font-size: 14px; color: var(--text-secondary); text-align: center; }

.activate-form {
    width: 100%;
}
.activate-form .glass-card { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }

.form-input-wrap {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: border-color 0.2s;
}
.form-input-wrap:focus-within { border-color: var(--primary); }
.form-input-wrap svg { width: 20px; height: 20px; color: var(--primary-light); flex-shrink: 0; }
.form-input-wrap input {
    flex: 1; border: none; background: none; outline: none;
    font-size: 15px; font-family: var(--font-code); color: var(--text-primary);
}
.form-input-wrap input::placeholder { color: var(--text-muted); }

.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px;
    background: linear-gradient(90deg, #2563EB, #6366F1);
    color: #fff; border: none; border-radius: var(--radius-md);
    font-size: 16px; font-weight: 700; font-family: var(--font-ui);
    cursor: pointer; box-shadow: 0 4px 16px rgba(37,99,235,0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary svg { width: 20px; height: 20px; }

.btn-outline-danger {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 15px;
    background: var(--glass-bg); color: var(--danger);
    border: 1.5px solid var(--danger); border-radius: var(--radius-md);
    font-size: 15px; font-weight: 600; font-family: var(--font-ui);
    cursor: pointer; transition: all 0.2s;
}
.btn-outline-danger:active { background: rgba(239,68,68,0.1); }

.activate-note {
    font-size: 13px; color: var(--text-muted); text-align: center; line-height: 1.6;
}

/* ---- Submit Page ---- */
.submit-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.submit-header h1 { font-size: 22px; font-weight: 700; }
.auth-badge {
    display: flex; align-items: center; gap: 5px;
    background: rgba(16,185,129,0.1);
    border-radius: var(--radius-sm); padding: 6px 12px;
    font-size: 12px; font-weight: 600; color: var(--success);
}
.auth-badge svg { width: 14px; height: 14px; }

.switch-key-btn {
    display: flex; align-items: center; gap: 5px;
    background: rgba(239,68,68,0.08);
    border-radius: var(--radius-sm); padding: 6px 12px;
    font-size: 12px; font-weight: 600; color: var(--danger);
    text-decoration: none; transition: background 0.2s;
}
.switch-key-btn:hover { background: rgba(239,68,68,0.15); text-decoration: none; }
.switch-key-btn svg { width: 14px; height: 14px; }

.choice-label { font-size: 15px; font-weight: 600; margin-bottom: 12px; }

.choice-row { display: flex; gap: 12px; margin-bottom: 20px; }
.choice-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 18px 16px; border-radius: 16px;
    border: 2px solid var(--border); background: var(--glass-bg);
    cursor: pointer; transition: all 0.25s; text-align: center;
}
.choice-btn.active {
    background: var(--primary); border-color: var(--primary);
    box-shadow: 0 3px 14px rgba(37,99,235,0.2);
}
.choice-btn.active.accent { background: var(--accent); border-color: var(--accent); box-shadow: 0 3px 14px rgba(99,102,241,0.2); }
.choice-btn .choice-icon {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
}
.choice-btn .choice-icon { background: rgba(37,99,235,0.08); }
.choice-btn .choice-icon svg { width: 22px; height: 22px; color: var(--primary); }
.choice-btn.active .choice-icon { background: rgba(255,255,255,0.15); }
.choice-btn.active .choice-icon svg { color: #fff; }
.choice-btn .choice-text { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.choice-btn.active .choice-text { color: #fff; font-weight: 700; }

.submit-form-card {
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-accent {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 15px;
    background: linear-gradient(90deg, #6366F1, #8B5CF6);
    color: #fff; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 600; font-family: var(--font-ui);
    cursor: pointer; box-shadow: 0 3px 12px rgba(99,102,241,0.2);
}

.upload-area {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; height: 160px;
    background: var(--bg-input); border-radius: var(--radius-md);
    border: 2px dashed #CBD5E1; cursor: pointer;
    transition: border-color 0.2s;
}
.upload-area:hover { border-color: var(--primary-light); }
.upload-area svg { width: 36px; height: 36px; color: var(--primary-light); }
.upload-area .upload-text { font-size: 14px; color: var(--text-secondary); }
.upload-area .upload-hint { font-size: 11px; color: var(--text-muted); }
.upload-area img { max-width: 140px; max-height: 140px; border-radius: 8px; }

.qr-result { font-size: 13px; padding: 8px 0; }
.qr-result.success { color: var(--success); }
.qr-result.error { color: var(--danger); }

/* History Section */
.history-header {
    display: flex; justify-content: space-between; align-items: center;
    margin: 20px 0 12px;
}
.history-header h3 { font-size: 16px; font-weight: 700; }
.history-header a { font-size: 13px; }

.history-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: var(--radius-md); padding: 14px 16px;
    margin-bottom: 10px;
}
.history-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    background: rgba(16,185,129,0.08); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
}
.history-icon svg { width: 18px; height: 18px; color: var(--success); }
.history-info { flex: 1; min-width: 0; }
.history-url {
    font-size: 13px; font-family: var(--font-code); color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---- Result Page ---- */
.result-page { display: flex; flex-direction: column; gap: 20px; }

.result-title {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 24px; font-weight: 700;
}
.result-title svg { width: 22px; height: 22px; color: var(--success); }
.result-subtitle { font-size: 14px; color: var(--text-secondary); text-align: center; }

.detail-card { padding: 20px; }
.detail-card .qr-section { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 16px; }
.detail-card .qr-label {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 15px; font-weight: 700;
}
.detail-card .qr-label svg { width: 16px; height: 16px; color: var(--primary); }
.detail-card .qr-img-wrap {
    width: 180px; height: 180px; background: #fff;
    border-radius: var(--radius-md); border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(30,64,175,0.03);
    display: flex; align-items: center; justify-content: center; padding: 10px;
}
.detail-card .qr-img-wrap img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.detail-card .qr-hint { font-size: 12px; color: var(--text-muted); }
.detail-card .divider { height: 1px; background: var(--border); width: 100%; margin: 4px 0; }

.detail-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid #F1F5F9;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 13px; color: var(--text-muted); }
.detail-value { font-size: 13px; font-weight: 600; color: var(--text-primary); font-family: var(--font-code); }
.detail-value.url { color: var(--primary); font-size: 12px; word-break: break-all; max-width: 200px; text-align: right; }

.badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 6px; font-size: 12px; font-weight: 600;
}
.badge-success { background: rgba(16,185,129,0.08); color: var(--success); }
.badge-primary { background: rgba(37,99,235,0.08); color: var(--primary); }
.badge-danger { background: rgba(239,68,68,0.08); color: var(--danger); }

.msg-card {
    display: flex; gap: 10px; align-items: flex-start;
    background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.12);
    border-radius: var(--radius-md); padding: 14px 16px;
}
.msg-card svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 2px; }
.msg-card p { font-size: 13px; color: #065F46; line-height: 1.6; }

.btn-row { display: flex; flex-direction: column; gap: 12px; }

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.font-code { font-family: var(--font-code); }
