/* common.css — pay-zy 支付中心设计系统
 * 复用 demo-zy 的设计令牌，统一品牌感
 * 引入方式：<link rel="stylesheet" href="common.css">
 */

:root {
    /* 品牌色 */
    --color-brand:       #667eea;
    --color-brand-dark:  #5a6fd6;
    --color-brand-light: #818cf8;
    --color-accent:      #764ba2;
    --color-soft:        #eef2ff;
    --gradient-brand:    linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-brand-soft: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    --gradient-success:  linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-warning:  linear-gradient(135deg, #f59e0b 0%, #f97316 100%);

    /* 语义色 */
    --color-success: #22c55e;
    --color-danger:  #ef4444;
    --color-warning: #f59e0b;
    --color-info:    #3b82f6;

    /* 中性色 */
    --color-bg:          #f8fafc;
    --color-surface:     #ffffff;
    --color-surface-2:   #f1f5f9;
    --color-border:      #e2e8f0;
    --color-border-strong: #cbd5e1;
    --color-text:        #0f172a;
    --color-text-secondary: #475569;
    --color-text-tertiary:  #94a3b8;

    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 字号 */
    --text-xs:   12px;
    --text-sm:   14px;
    --text-base: 16px;
    --text-lg:   18px;
    --text-xl:   22px;
    --text-2xl:  28px;
    --text-3xl:  36px;
    --text-4xl:  48px;

    /* 字重 */
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;

    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
    --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    --shadow-md: 0 4px 6px -1px rgba(15,23,42,0.08), 0 2px 4px -2px rgba(15,23,42,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15,23,42,0.10), 0 4px 6px -4px rgba(15,23,42,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(15,23,42,0.12), 0 8px 10px -6px rgba(15,23,42,0.06);
    --shadow-brand:    0 8px 24px -6px rgba(102,126,234,0.40);
    --shadow-brand-lg: 0 16px 40px -8px rgba(102,126,234,0.45);

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 全局 reset ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--color-brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 页面容器 ===== */
.page-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

/* ===== 品牌区 ===== */
.brand-bar {
    display: flex; align-items: center; gap: 12px;
    justify-content: center;
    margin-bottom: var(--space-xl);
}
.brand-logo {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-brand);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: var(--weight-extrabold);
    font-size: var(--text-lg);
    box-shadow: var(--shadow-brand);
    letter-spacing: -1px;
}
.brand-text { text-align: left; }
.brand-name { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--color-text); }
.brand-tag { font-size: var(--text-xs); color: var(--color-text-tertiary); margin-top: 2px; }

/* ===== 登录页价值主张与信任标识 ===== */
.auth-value-props {
    margin-bottom: var(--space-lg);
    display: flex; flex-direction: column; gap: 8px;
}
.value-prop-item {
    display: flex; align-items: center; gap: 8px;
    font-size: var(--text-sm); color: var(--color-text-secondary);
}
.value-prop-check {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: #dcfce7; color: #15803d;
    font-size: 11px; font-weight: var(--weight-bold);
    flex-shrink: 0;
}
.auth-trust {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}
.trust-item {
    font-size: var(--text-xs); color: var(--color-text-tertiary);
    display: flex; align-items: center; gap: 4px;
}
.trust-item::before {
    content: ''; display: inline-block;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--color-success);
}

/* 未登录页产品预览 */
.auth-product-preview {
    margin: var(--space-lg) 0 var(--space-md);
    padding: var(--space-md);
    background: var(--color-surface-2);
    border-radius: var(--radius-md);
}
.preview-title {
    font-size: var(--text-sm); font-weight: var(--weight-bold);
    color: var(--color-text); margin-bottom: var(--space-sm);
}
.preview-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.preview-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: var(--weight-bold); font-size: var(--text-sm);
    flex-shrink: 0;
}
.preview-info { flex: 1; min-width: 0; }
.preview-name { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text); }
.preview-note { font-size: var(--text-xs); color: var(--color-text-tertiary); margin-top: 2px; }
.preview-price { font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--color-brand-dark); flex-shrink: 0; }
.preview-price-unit { font-size: var(--text-xs); color: var(--color-text-tertiary); font-weight: var(--weight-normal); }
.preview-social {
    display: flex; align-items: center; gap: 6px;
    font-size: var(--text-xs); color: var(--color-text-secondary);
    margin-top: 10px; justify-content: center;
}
.preview-pulse {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--color-success); animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.5;transform:scale(1.3);} }
.preview-cta {
    text-align: center; font-size: var(--text-xs);
    color: var(--color-brand-dark); font-weight: var(--weight-semibold);
    margin-top: 8px;
}

/* 注册协议复选框 */
.form-agree { margin-top: var(--space-sm); }
.agree-label {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: var(--text-xs); color: var(--color-text-secondary);
    cursor: pointer; line-height: 1.5;
}
.agree-label input { margin-top: 2px; flex-shrink: 0; }
.agree-label a { color: var(--color-brand); text-decoration: none; }
.agree-label a:hover { text-decoration: underline; }

/* ===== 通用卡片 ===== */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
}

/* ===== 认证页（登录/注册/设置密码）专用容器 ===== */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 40%, #f8fafc 100%);
    display: flex; align-items: center; justify-content: center;
    padding: var(--space-xl) var(--space-md);
}
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl) var(--space-lg);
}
.auth-title {
    font-size: var(--text-xl); font-weight: var(--weight-bold);
    text-align: center; margin-bottom: var(--space-sm);
}
.auth-subtitle {
    font-size: var(--text-sm); color: var(--color-text-secondary);
    text-align: center; margin-bottom: var(--space-lg);
}

/* ===== Tab 分段控件 ===== */
.tab-group {
    display: flex; gap: 4px;
    background: var(--color-surface-2);
    border-radius: var(--radius-full);
    padding: 4px;
    margin-bottom: var(--space-lg);
}
.tab-btn {
    flex: 1; border: none; background: transparent;
    padding: 10px 20px; border-radius: var(--radius-full);
    font-size: var(--text-sm); font-weight: var(--weight-semibold);
    color: var(--color-text-secondary);
    cursor: pointer; transition: var(--transition);
}
.tab-btn.active {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== 表单输入 ===== */
.form-group { margin-bottom: var(--space-md); }
.input-field {
    width: 100%; padding: 12px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-surface);
    transition: var(--transition);
    outline: none;
}
.input-field:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.input-field::placeholder { color: var(--color-text-tertiary); }
/* 表单实时验证反馈 */
.input-field.valid {
    border-color: var(--color-success);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 38px;
}
.input-field.invalid {
    border-color: var(--color-danger);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='12'/><line x1='12' y1='16' x2='12.01' y2='16'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 38px;
}
.field-hint {
    font-size: var(--text-xs); margin-top: 4px; margin-left: 4px;
    min-height: 16px; line-height: 1.4;
}
.field-hint.error { color: var(--color-danger); }
.field-hint.success { color: var(--color-success); }

/* ===== 按钮 ===== */
.btn-primary {
    width: 100%; padding: 12px 24px;
    border: none; border-radius: var(--radius-full);
    background: var(--gradient-brand);
    color: #fff; font-size: var(--text-base); font-weight: var(--weight-semibold);
    cursor: pointer; transition: var(--transition);
    box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
    box-shadow: var(--shadow-brand-lg);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
    padding: 8px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: var(--text-sm); font-weight: var(--weight-medium);
    cursor: pointer; transition: var(--transition);
}
.btn-secondary:hover {
    border-color: var(--color-brand);
    color: var(--color-brand-dark);
    background: var(--color-soft);
}

.btn-blue {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px;
    border: none; border-radius: var(--radius-full);
    background: var(--gradient-brand);
    color: #fff; font-size: var(--text-sm); font-weight: var(--weight-semibold);
    cursor: pointer; transition: var(--transition);
    box-shadow: var(--shadow-brand);
    text-decoration: none;
}
.btn-blue:hover { box-shadow: var(--shadow-brand-lg); transform: translateY(-1px); text-decoration: none; }

.btn-link {
    background: none; border: none;
    color: var(--color-text-tertiary);
    font-size: var(--text-sm); cursor: pointer;
    padding: 4px 8px; transition: var(--transition);
}
.btn-link:hover { color: var(--color-danger); }

/* ===== 提示框 ===== */
.alert-error {
    background: #fef2f2; color: var(--color-danger);
    border: 1px solid #fecaca;
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: var(--text-sm); margin-bottom: var(--space-md);
}
.alert-info {
    background: var(--color-soft); color: var(--color-brand-dark);
    border: 1px solid #c7d2fe;
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: var(--text-sm); margin-bottom: var(--space-md);
}
.alert-warning {
    background: #fffbeb; color: var(--color-warning);
    border: 1px solid #fde68a;
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: var(--text-sm); margin-bottom: var(--space-md);
}
.note { font-size: var(--text-xs); color: var(--color-text-tertiary); margin-top: var(--space-sm); }

/* ===== 顶部导航栏 ===== */
.nav-bar {
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-logo {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    background: var(--gradient-brand);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: var(--weight-bold); font-size: var(--text-sm);
}
.nav-title { font-size: var(--text-base); font-weight: var(--weight-bold); }
.nav-user { font-size: var(--text-sm); color: var(--color-text-secondary); }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* ===== 积分胶囊 ===== */
.points-badge {
    background: var(--color-soft);
    color: var(--color-brand-dark);
    font-size: var(--text-sm); font-weight: var(--weight-semibold);
    padding: 6px 14px; border-radius: var(--radius-full);
    border: 1px solid var(--color-brand-light);
}

/* ===== 区块标题 ===== */
.section-title {
    font-size: var(--text-lg); font-weight: var(--weight-bold);
    color: var(--color-text);
    margin: var(--space-xl) 0 var(--space-md);
    display: flex; align-items: center; gap: 8px;
}
.section-count {
    font-size: var(--text-xs); font-weight: var(--weight-semibold);
    background: var(--color-soft); color: var(--color-brand-dark);
    padding: 2px 10px; border-radius: var(--radius-full);
}
.section-title-row {
    display: flex; align-items: center; justify-content: space-between;
    margin: var(--space-xl) 0 var(--space-md);
}
.section-title-row .section-title { margin: 0; }
.coming-soon-toggle-btn {
    background: none; border: 1px solid var(--color-border);
    color: var(--color-text-tertiary);
    font-size: var(--text-xs); font-weight: var(--weight-normal);
    padding: 4px 12px; border-radius: var(--radius-full);
    cursor: pointer; transition: var(--transition);
    white-space: nowrap;
}
.coming-soon-toggle-btn:hover {
    border-color: var(--color-brand);
    color: var(--color-brand-dark);
}
.coming-soon-toggle-btn:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

/* ===== 产品卡片 ===== */
.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}
.product-card:hover {
    border-color: var(--color-brand-light);
    box-shadow: var(--shadow-md);
}
.product-name {
    font-size: var(--text-lg); font-weight: var(--weight-bold);
    margin-bottom: 2px;
}
.product-desc {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}
.product-meta {
    font-size: var(--text-sm); color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}
.remaining-count {
    font-size: var(--text-lg); font-weight: var(--weight-bold);
    color: var(--color-success);
}
.remaining-label { font-size: var(--text-sm); color: var(--color-text-tertiary); }

/* ===== 价格标签 ===== */
.price-tag {
    font-size: var(--text-xl); font-weight: var(--weight-bold);
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}
.discount-badge {
    display: inline-block;
    font-size: var(--text-xs); font-weight: var(--weight-semibold);
    padding: 2px 8px; border-radius: var(--radius-full);
    margin-left: 6px; vertical-align: middle;
}
.discount-badge.green { background: var(--color-success); color: #fff; }
.discount-badge.purple { background: var(--color-accent); color: #fff; }

/* ===== 购买选项 ===== */
.buy-options {
    display: flex; flex-wrap: wrap; gap: var(--space-sm);
    margin: var(--space-md) 0;
}
.buy-btn {
    padding: 8px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    font-size: var(--text-sm); font-weight: var(--weight-medium);
    cursor: pointer; transition: var(--transition);
}
.buy-btn:hover {
    border-color: var(--color-brand);
    color: var(--color-brand-dark);
    background: var(--color-soft);
}

/* ===== 自定义次数输入 ===== */
.custom-input {
    display: none; align-items: center; gap: 8px;
    margin-top: var(--space-sm);
}
.custom-input input {
    width: 100px; padding: 8px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm); outline: none;
}
.custom-input input:focus { border-color: var(--color-brand); }
.custom-input button {
    padding: 8px 16px;
    border: none; border-radius: var(--radius-full);
    background: var(--color-brand); color: #fff;
    font-size: var(--text-sm); cursor: pointer;
}

/* ===== 支付区域 ===== */
.pay-area {
    display: none;
    background: var(--color-surface-2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-md);
}
.total-price {
    font-size: var(--text-2xl); font-weight: var(--weight-extrabold);
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    text-align: center;
}
.total-price .price-currency { font-size: var(--text-base); font-weight: var(--weight-semibold); margin-right: 2px; }
.points-input {
    margin-bottom: var(--space-sm);
    font-size: var(--text-sm); color: var(--color-text-secondary);
}
.points-input input {
    width: 80px; padding: 6px 10px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm); margin-left: 6px; outline: none;
}
.points-input input:focus { border-color: var(--color-brand); }
.points-input { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.points-all-btn {
    padding: 5px 12px;
    border: 1px solid var(--color-brand);
    background: var(--color-soft);
    color: var(--color-brand-dark);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    cursor: pointer;
    font-weight: var(--weight-semibold);
}
.points-all-btn:hover { background: var(--color-brand); color: #fff; }
.points-summary {
    margin: 8px 0 12px;
    min-height: 24px;
    line-height: 1.4;
}
.qrcode-box:empty {
    display: none;
}
.qrcode-box {
    margin-top: var(--space-md);
    text-align: center;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    display: inline-block;
    border: 2px solid var(--color-brand-light);
}
.pay-status {
    margin-top: var(--space-sm);
    font-size: var(--text-sm); color: var(--color-text-secondary);
    text-align: center;
}
.pay-status.success { color: var(--color-success); font-weight: var(--weight-semibold); }

/* ===== 分类筛选 ===== */
.filter-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    overflow: hidden;
}
.filter-header {
    padding: 12px 16px;
    cursor: pointer; user-select: none;
    display: flex; align-items: center; justify-content: space-between;
    font-size: var(--text-sm); font-weight: var(--weight-semibold);
    color: var(--color-text);
    transition: var(--transition);
}
.filter-header:hover { background: var(--color-surface-2); }
.filter-toggle { font-size: var(--text-xs); color: var(--color-text-tertiary); }
.filter-content {
    display: none;
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
}
.filter-content.open { display: block; }
.filter-row {
    display: flex; flex-wrap: wrap; gap: var(--space-sm);
    align-items: center; margin-bottom: var(--space-sm);
}
.filter-row span { font-size: var(--text-sm); color: var(--color-text-secondary); }
.filter-row select {
    padding: 6px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm); background: var(--color-surface);
    color: var(--color-text); outline: none;
}
.filter-row select:focus { border-color: var(--color-brand); }

/* ===== 成功页 ===== */
.success-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 40%, #f8fafc 100%);
    display: flex; align-items: center; justify-content: center;
    padding: var(--space-xl) var(--space-md);
}
.success-card {
    width: 100%; max-width: 440px;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
}
.success-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--color-success);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: var(--weight-bold);
    margin: 0 auto var(--space-lg);
    box-shadow: 0 8px 24px -6px rgba(34,197,94,0.40);
}
.success-title {
    font-size: var(--text-xl); font-weight: var(--weight-bold);
    margin-bottom: var(--space-sm);
}
.success-text {
    font-size: var(--text-sm); color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    .page-wrap { padding: var(--space-sm) var(--space-xs); }
    .nav-bar { padding: 8px 10px; flex-wrap: wrap; gap: 6px; }
    .nav-title { font-size: var(--text-sm); }
    .nav-user { display: none; }
    .nav-right { flex-wrap: wrap; gap: 6px; }
    .points-badge { font-size: var(--text-xs); padding: 4px 8px; }
    .product-card { padding: var(--space-sm); margin-bottom: var(--space-sm); }
    .buy-options { flex-direction: column; gap: 6px; }
    .buy-btn { width: 100%; text-align: center; padding: 10px; font-size: var(--text-sm); }
    .filter-row { flex-direction: column; align-items: flex-start; }
    .pay-area { padding: var(--space-sm); }
    .qrcode-box { text-align: center; }
    .qrcode-box canvas, .qrcode-box img { margin: 0 auto; }
    .total-price { font-size: var(--text-xl); }
    .points-input { font-size: var(--text-sm); }
    .auth-card { padding: 20px 16px; margin: 12px; }
    .success-card { padding: 28px 18px; }
    .brand-name { font-size: var(--text-base); }
    /* 移动端客服按钮只显示图标 */
    .kf-label { display:none; }
    .coming-soon-grid { grid-template-columns: 1fr; }
    .section-title { font-size: var(--text-base); }
    .btn-primary { padding: 10px 16px; font-size: var(--text-sm); }
    .input-field { padding: 10px 12px; font-size: var(--text-sm); }
    .tab-btn { padding: 8px 16px; font-size: var(--text-sm); }
}

/* ===== 开发中软件 ===== */
.coming-soon-section {
    margin-top: var(--space-xl);
}
.coming-soon-banner {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px dashed var(--color-brand-light);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    display: flex; align-items: center; gap: 10px;
    font-size: var(--text-sm);
    color: var(--color-brand-dark);
}
.coming-soon-banner .ic {
    width: 18px; height: 18px; flex-shrink: 0;
    background: var(--gradient-brand);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>") center/contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>") center/contain no-repeat;
}
.coming-soon-group {
    margin-bottom: var(--space-lg);
}
.coming-soon-group-title {
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    padding-left: 10px;
    border-left: 3px solid var(--color-brand);
}
.coming-soon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-sm);
}
.coming-soon-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    position: relative;
    transition: var(--transition);
}
.coming-soon-card:hover {
    border-color: var(--color-brand-light);
    box-shadow: var(--shadow-sm);
}
.coming-soon-card-name {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text);
    margin-bottom: 4px;
}
.coming-soon-card-desc {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    line-height: 1.5;
}
.coming-soon-tag {
    position: absolute;
    top: 8px; right: 8px;
    font-size: 10px; font-weight: var(--weight-semibold);
    padding: 2px 8px; border-radius: var(--radius-full);
    background: var(--color-surface-2);
    color: var(--color-text-tertiary);
}
@media (max-width: 600px) {
    .coming-soon-grid { grid-template-columns: 1fr; }
    .auth-value-props { gap: 6px; }
    .value-prop-item { font-size: var(--text-xs); }
    .auth-trust { gap: 8px; flex-wrap: wrap; justify-content: center; }
    .trust-item { font-size: var(--text-xs); }
}

/* ===== 购买流程步骤指示器 ===== */
.pay-steps {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; margin-bottom: var(--space-md); flex-wrap: nowrap;
}
.pay-step {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px 6px 8px; border-radius: var(--radius-full);
    font-size: var(--text-xs); font-weight: var(--weight-semibold);
    background: var(--color-surface-2); color: var(--color-text-tertiary);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}
.pay-step .step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--color-border-strong); color: #fff;
    font-size: 11px; font-weight: var(--weight-bold);
    transition: var(--transition);
}
.pay-step.active {
    background: var(--gradient-brand); color: #fff; border-color: transparent;
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}
.pay-step.active .step-num {
    background: rgba(255,255,255,0.25);
}
.pay-step.done { background: #dcfce7; color: #15803d; border-color: transparent; }
.pay-step.done .step-num { background: var(--color-success); }
.pay-step-line { width: 22px; height: 2px; background: var(--color-border); border-radius: 1px; }
.pay-step-line.active { background: var(--color-brand); }

/* ===== Spinner ===== */
.btn-spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 确认弹窗 ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9000; padding: 16px;
}
.modal-container {
    background: var(--color-surface);
    padding: 28px; border-radius: var(--radius-lg);
    max-width: 400px; width: 100%;
    box-shadow: var(--shadow-xl);
}
.modal-container h3 { font-size: var(--text-lg); margin-bottom: 18px; }
.confirm-row {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--color-border);
    font-size: var(--text-sm);
}
.confirm-row:last-of-type { border-bottom: none; }
.confirm-label { color: var(--color-text-tertiary); }
.confirm-value { color: var(--color-text); font-weight: var(--weight-semibold); }
.confirm-amount { color: var(--color-brand-dark); font-size: var(--text-lg); }
.modal-buttons { display: flex; gap: 10px; margin-top: 20px; }
.modal-buttons .btn-primary, .modal-buttons .btn-secondary { flex: 1; }

/* ===== 二维码操作引导 ===== */
.pay-guide { text-align: center; padding: 12px 0; }
.pay-guide-steps {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}
.pay-guide-step {
    font-size: var(--text-xs); color: var(--color-text-secondary);
    background: var(--color-surface-2); padding: 6px 12px;
    border-radius: var(--radius-full); font-weight: var(--weight-semibold);
}
.pay-guide-arrow { color: var(--color-text-tertiary); font-size: var(--text-xs); }
.pay-amount-display {
    font-size: 28px; color: #1e293b; font-weight: var(--weight-bold);
    margin-bottom: 6px;
}
.pay-order-no { font-size: var(--text-xs); color: #64748b; margin-bottom: 10px; }
.pay-poll-status {
    font-size: var(--text-xs); color: var(--color-text-secondary);
    margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pay-poll-status .btn-spinner {
    border-color: rgba(102,126,234,0.3);
    border-top-color: var(--color-brand);
    width: 12px; height: 12px;
}
.pay-qr-tip { font-size: var(--text-xs); color: #94a3b8; }
.pay-error { text-align: center; padding: 12px; color: #ef4444; }
.pay-success-text { text-align: center; padding: 12px; color: #22c55e; font-weight: var(--weight-bold); }
.pay-success-text .success-check {
    display: block; margin: 0 auto 8px;
    width: 48px; height: 48px;
}
.pay-success-text .success-check circle {
    stroke-dasharray: 138;
    animation: payDrawCircle 0.6s ease-out both;
}
.pay-success-text .success-check path {
    stroke-dasharray: 50;
    animation: payDrawCheck 0.35s ease-out 0.5s both;
}
@keyframes payDrawCircle { from { stroke-dashoffset: 138; } to { stroke-dashoffset: 0; } }
@keyframes payDrawCheck { from { stroke-dashoffset: 50; } to { stroke-dashoffset: 0; } }
.btn-retry {
    margin-top: 8px; padding: 6px 16px;
    background: var(--color-brand); color: #fff;
    border: none; border-radius: var(--radius-full); cursor: pointer;
}

/* ===== 软件目录级联筛选 ===== */
.catalog-cascade {
    display: flex; align-items: flex-end; gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--color-soft);
    border-radius: var(--radius-md);
}
.catalog-select-group {
    display: flex; flex-direction: column; gap: 4px;
    flex: 1; min-width: 140px;
}
.catalog-select-label {
    font-size: 11px;
    font-weight: var(--weight-bold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.catalog-select {
    padding: 10px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-family: inherit;
    background: var(--color-surface);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2394a3b8'/%3E%3C/svg%3E\");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}
.catalog-select:focus { outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(102,126,234,0.12); }
.catalog-select:disabled { opacity: 0.5; cursor: not-allowed; background: var(--color-bg); }
.catalog-arrow {
    color: var(--color-text-tertiary);
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    padding-bottom: 10px;
    flex-shrink: 0;
}
.catalog-reset-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition);
    margin-left: 10px;
}
.catalog-reset-btn:hover { border-color: var(--color-danger); color: var(--color-danger); }
.catalog-type-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--color-soft);
    color: var(--color-brand-dark);
    border-radius: var(--radius-full);
    font-size: 11px;
    margin: 2px 4px 0 0;
}
.coming-soon-group-title { margin-bottom: 10px !important; }
.coming-soon-card-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    line-height: 1.7;
}
.coming-soon-card-info strong { color: var(--color-text); }
