:root {
    --brand-primary: #2B7FED;
    --brand-primary-hover: #1E6DEB;
    --brand-primary-active: #1558C4;
    --brand-accent: #FF9933;
    --brand-accent-glow: rgba(255, 153, 51, 0.15);
    --brand-blue-glow: rgba(43, 127, 237, 0.16);
    --bg-body: #F6F8FC;
    --bg-card: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-tertiary: #94A3B8;
    --border-light: #E2E8F0;
    --border-card: rgba(226, 232, 240, 0.9);
    --border-focus: #2B7FED;
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-card-hover: 0 20px 40px -8px rgba(43, 127, 237, 0.15), 0 6px 16px -4px rgba(15, 23, 42, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 10% 10%, rgba(43, 127, 237, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 20%, rgba(255, 153, 51, 0.06) 0px, transparent 45%),
        radial-gradient(at 50% 90%, rgba(43, 127, 237, 0.05) 0px, transparent 60%);
    background-attachment: fixed;
}

/* 背景几何装饰网格 */
.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 620px;
    background-size: 36px 36px;
    background-image: 
        linear-gradient(to right, rgba(226, 232, 240, 0.4) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(226, 232, 240, 0.4) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* 顶部导航栏 */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    margin-bottom: 48px;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-logo-link:hover {
    opacity: 0.9;
}

.nav-logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.nav-badges {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: #059669;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    padding: 5px 12px;
    border-radius: 999px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background-color: #10B981;
    border-radius: 50%;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    background-color: #10B981;
    border-radius: 50%;
    opacity: 0.6;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.9); opacity: 0; }
}

.nav-doc-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-doc-link:hover {
    color: var(--brand-primary);
    background: rgba(43, 127, 237, 0.06);
}

/* Hero 区域 */
.hero-section {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 56px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(43, 127, 237, 0.08) 0%, rgba(255, 153, 51, 0.08) 100%);
    border: 1px solid rgba(43, 127, 237, 0.2);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 20px;
}

.hero-tag .tag-sparkle {
    color: var(--brand-accent);
}

.hero-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.25;
    color: #0F172A;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #2B7FED 0%, #1558C4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 400;
}

/* 核心下载卡片 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-bottom: 56px;
}

.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2B7FED, #60A5FA);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.download-card.card-agent::before {
    background: linear-gradient(90deg, #FF9933, #FBBF24);
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(43, 127, 237, 0.3);
}

.download-card:hover::before {
    opacity: 1;
}

.card-top {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 18px -4px rgba(43, 127, 237, 0.35);
}

.app-icon.icon-merchant {
    background: linear-gradient(135deg, #2B7FED 0%, #1558C4 100%);
}

.app-icon.icon-agent {
    background: linear-gradient(135deg, #FF9933 0%, #E65C00 100%);
    box-shadow: 0 8px 18px -4px rgba(255, 153, 51, 0.35);
}

.app-icon svg {
    width: 32px;
    height: 32px;
    color: #ffffff;
}

.card-header-info {
    flex: 1;
}

.card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.01em;
}

.role-pill {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 6px;
}

.role-pill.merchant {
    background: rgba(43, 127, 237, 0.1);
    color: var(--brand-primary);
}

.role-pill.agent {
    background: rgba(255, 153, 51, 0.12);
    color: #D97706;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 核心功能列表 */
.feature-list {
    list-style: none;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}

.feature-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1.5px;
    background: #EFF6FF;
    color: var(--brand-primary);
}

.card-agent .feature-check {
    background: #FFFBEB;
    color: #D97706;
}

.feature-check svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
}

/* 版本元信息条 */
.meta-strip {
    background: #F8FAFC;
    border: 1px solid #EEF2F6;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
    text-align: center;
}

.meta-cell-label {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 2px;
    text-transform: uppercase;
}

.meta-cell-val {
    font-size: 13px;
    font-weight: 600;
    color: #1E293B;
}

/* 按钮组与交互 */
.btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
    background: linear-gradient(135deg, #2B7FED 0%, #1761D1 100%);
    box-shadow: 0 4px 14px -2px rgba(43, 127, 237, 0.45);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.card-agent .btn-download {
    background: linear-gradient(135deg, #FF9933 0%, #E65C00 100%);
    box-shadow: 0 4px 14px -2px rgba(255, 153, 51, 0.45);
}

.btn-download.btn-ios {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%) !important;
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.35) !important;
}

.btn-download:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 6px 20px -2px rgba(43, 127, 237, 0.55);
}

.btn-download.btn-ios:hover {
    box-shadow: 0 6px 20px -2px rgba(15, 23, 42, 0.5) !important;
}

.card-agent .btn-download:hover {
    box-shadow: 0 6px 20px -2px rgba(255, 153, 51, 0.55);
}

.btn-download:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.btn-download svg {
    width: 17px;
    height: 17px;
    stroke-width: 2.2;
    flex-shrink: 0;
}

.btn-qr-trigger {
    height: 48px;
    width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #FFFFFF;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.btn-qr-trigger:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: rgba(43, 127, 237, 0.04);
}

.btn-qr-trigger svg {
    width: 20px;
    height: 20px;
}

/* 扫码 Popover */
.qr-popover {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    display: none;
    flex-direction: column;
    align-items: center;
    width: 200px;
    z-index: 100;
    animation: qrFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.qr-popover::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #FFFFFF;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    transform: rotate(45deg);
}

.qr-popover.active {
    display: flex;
}

.qr-code-box {
    width: 168px;
    height: 168px;
    background: #F8FAFC;
    border: 1px solid #EEF2F6;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-bottom: 10px;
}

.qr-code-box canvas, .qr-code-box svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.qr-tip {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

/* 核心能力亮点四宫格 */
.features-section {
    margin-bottom: 56px;
}

.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    transition: all 0.25s ease;
}

.highlight-card:hover {
    border-color: rgba(43, 127, 237, 0.3);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.highlight-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(43, 127, 237, 0.08);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.highlight-card:nth-child(2) .highlight-icon-wrap {
    background: rgba(255, 153, 51, 0.1);
    color: #EA580C;
}

.highlight-card:nth-child(3) .highlight-icon-wrap {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.highlight-card:nth-child(4) .highlight-icon-wrap {
    background: rgba(139, 92, 246, 0.1);
    color: #7C3AED;
}

.highlight-icon-wrap svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.highlight-title {
    font-size: 16px;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 6px;
}

.highlight-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 安装指南卡片 */
.install-guide-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 56px;
}

.guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.guide-title {
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-title svg {
    width: 22px;
    height: 22px;
    color: var(--brand-primary);
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #F8FAFC;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid #EEF2F6;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 4px;
}

.step-info p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.brand-tips {
    background: #FEF9C3;
    border: 1px solid #FEF08A;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 13px;
    color: #854D0E;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.brand-tips svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #CA8A04;
}

/* 常见问题 FAQ */
.faq-section {
    margin-bottom: 56px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.faq-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
}

.faq-q {
    font-size: 15px;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-q::before {
    content: 'Q';
    display: inline-flex;
    width: 20px;
    height: 20px;
    background: rgba(43, 127, 237, 0.1);
    color: var(--brand-primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
}

.faq-a {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 28px;
}

/* 页脚 */
.site-footer {
    border-top: 1px solid var(--border-light);
    padding: 40px 0 60px;
    text-align: center;
}

.footer-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    padding: 6px 12px;
    border-radius: 6px;
}

.footer-badge svg {
    width: 14px;
    height: 14px;
    color: #10B981;
}

.copyright {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* 移动端悬浮底栏 */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-light);
    padding: 12px 16px;
    z-index: 990;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}

.mobile-btn-container {
    display: flex;
    gap: 10px;
}

.mobile-btn {
    flex: 1;
    height: 44px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: #fff;
}

.mobile-btn.merchant {
    background: var(--brand-primary);
}

.mobile-btn.agent {
    background: var(--brand-accent);
}

.mobile-btn svg {
    width: 16px;
    height: 16px;
}

/* 下载 Toast 提示 */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #0F172A;
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.25);
    z-index: 1000;
    pointer-events: none;
}

.toast.show {
    display: flex;
    animation: toastPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastPop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast svg {
    width: 16px;
    height: 16px;
    color: #10B981;
}

/* 响应式媒体查询 */
@media (max-width: 960px) {
    .app-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .highlight-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .guide-steps {
        grid-template-columns: 1fr;
    }
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        padding-bottom: 74px;
    }
    .container {
        padding: 0 16px;
    }
    .site-nav {
        padding: 16px 0;
        margin-bottom: 28px;
    }
    .nav-logo-img {
        height: 32px;
    }
    .nav-doc-link {
        display: none;
    }
    .hero-title {
        font-size: 28px;
    }
    .hero-desc {
        font-size: 15px;
    }
    .download-card {
        padding: 24px 20px;
    }
    .btn-group {
        grid-template-columns: 1fr 1fr;
    }
    .highlight-grid {
        grid-template-columns: 1fr;
    }
    .install-guide-section {
        padding: 24px 18px;
    }
    .mobile-bottom-bar {
        display: block;
    }
    .btn-qr-trigger {
        display: none;
    }
}

@media (max-width: 440px) {
    .btn-group {
        grid-template-columns: 1fr;
    }
}
