:root {
    --blue-50: #eff6ff;
    --blue-100: #e0f2fe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --green-theme: #17a376; /* 严格匹配截图的质感绿 */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
    background: var(--blue-100);
    color: var(--slate-800);
}

.page-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.card-shell {
    width: 100%;
    max-width: 420px;
    min-height: 660px;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04), 0 8px 16px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.top-bar {
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--blue-500), var(--violet-500));
}

.card-body {
    padding: 32px 24px 24px;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
}

.intro-block {
    text-align: center;
}

.brand-lockup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue-500), var(--violet-500));
    color: var(--white);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.25);
}

.brand-name {
    font-family: "Poppins", sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(90deg, var(--blue-600), var(--violet-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.intro-block h1 {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    color: var(--slate-900);
}

.intro-copy {
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.5;
    color: var(--slate-500);
    max-width: 280px;
}

.benefit-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.benefit-card {
    background: var(--slate-50);
    border-radius: 12px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    color: var(--slate-800);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--blue-600);
}

.benefit-icon svg {
    width: 100%;
    height: 100%;
}

.pagination-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 32px 0 24px;
}

.dot {
    display: inline-block;
    width: 24px;
    height: 8px;
    border-radius: 999px;
    background: var(--slate-200);
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--blue-500);
}

.content-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stage-panel {
    display: flex;
    flex-direction: column;
}

.stage-hidden {
    display: none !important;
}

.stage-panel.centered {
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.input-wrap {
    margin-bottom: 12px;
    width: 100%;
}

.stock-input {
    width: 100%;
    border: 1px solid var(--slate-200);
    background: var(--slate-50);
    color: var(--slate-800);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stock-input::placeholder {
    color: var(--slate-500);
    font-weight: 500;
    text-transform: none;
}

.stock-input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: var(--white);
}

.helper-copy {
    margin: 0 0 24px;
    text-align: center;
    color: var(--slate-400);
    font-size: 14px;
}

.primary-button,
.whatsapp-button {
    width: 100%;
    border: 0;
    border-radius: 50px; /* 调整为大圆角，完全匹配截图效果 */
    padding: 18px;
    color: var(--white);
    font-size: 17px; /* 字体略微放大 */
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    background: linear-gradient(90deg, #10b981 0%, #17a376 100%); /* 匹配截图中的渐变绿 */
    box-shadow: 0 8px 20px rgba(23, 163, 118, 0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-button {
    background: linear-gradient(90deg, var(--blue-600), var(--violet-500));
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.25);
}

.whatsapp-button {
    background: var(--green-theme); 
    box-shadow: 0 10px 24px rgba(23, 163, 118, 0.25);
}

.primary-button:hover,
.whatsapp-button:hover {
    transform: translateY(-2px);
}

.button-link-copy {
    text-decoration: none;
}

.trust-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 24px;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 500;
    width: 100%;
}

.delivery-row {
    display: flex;
    justify-content: space-between; /* 使用 space-between 让三个元素自然分布 */
    align-items: center;
    margin-top: 24px;
    padding: 0 4px; /* 增加左右内边距防止贴边 */
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 600;
    width: 100%;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 5px; /* 图标和文字的间距 */
    white-space: nowrap;
}

.trust-icon {
    width: 16px;
    height: 16px;
    color: var(--green-theme);
}

/* Step 2 Loading */
.loader-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid var(--blue-100);
    border-top-color: var(--blue-600);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px auto;
}

.accent-text {
    color: var(--blue-600);
}

/* Step 3 Animated Success Badge (Draw Effect) */
.animated-success-badge {
    width: 72px;
    height: 72px;
    margin: 0 auto 28px auto;
    color: var(--green-theme);
}

.success-svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-circle {
    /* 2 * pi * 24 ≈ 151 */
    stroke-dasharray: 151; 
    stroke-dashoffset: 151;
    transform-origin: 50% 50%;
    /* 从12点钟方向开始 */
    transform: rotate(-90deg); 
    /* 0.5秒顺时针画圆 */
    animation: drawCircle 0.5s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-check {
    /* 勾的路径长度约等于40 */
    stroke-dasharray: 40; 
    stroke-dashoffset: 40;
    /* 延迟0.4秒，等圆圈快画完时开始从左往右打勾 */
    animation: drawCheck 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards; 
}

#step-2 h2,
#step-3 h2 {
    margin: 0 0 16px;
    color: var(--slate-900);
    font-size: 24px;
    font-weight: 700;
}

#step-2 p,
#step-3 h3,
.result-copy {
    margin: 0;
    color: var(--slate-500);
}

#step-3 h3 {
    font-size: 18px;
    color: var(--slate-900);
    margin-bottom: 12px;
    font-weight: 700;
}

.result-copy {
    max-width: 280px;
    line-height: 1.5;
    margin: 0 auto 28px auto;
}

.legal-note {
    margin-top: 24px;
    padding-top: 18px;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    color: var(--slate-400);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.robot-head-animate {
    animation: gentleBob 2.5s ease-in-out infinite;
}

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

@keyframes gentleBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes drawCircle {
    100% { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
    100% { stroke-dashoffset: 0; }
}

@media (min-width: 768px) {
    .card-shell {
        min-height: 680px;
    }
    .card-body {
        padding: 40px;
    }
}