/* App 下载推广组件（Web 端公共样式，三页复用） */

/* 渲染成功前保持隐藏，避免出现空白区块 */
#app-promo-container {
    display: none;
}

/* 主卡片：醒目渐变 + 强阴影 */
.app-promo-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 26px 30px;
    margin: 0 0 28px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3498db 0%, #6c5ce7 55%, #8e44ad 100%);
    box-shadow: 0 14px 32px rgba(52, 152, 219, 0.35);
    color: var(--white, #ffffff);
}

/* 右上角高光装饰 */
.app-promo-card::before {
    content: "";
    position: absolute;
    top: -60%;
    right: -8%;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.app-promo-body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.app-promo-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    color: var(--white, #ffffff);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.app-promo-text {
    min-width: 0;
}

/* 顶部徽标 */
.app-promo-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--white, #ffffff);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.app-promo-title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--white, #ffffff);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.app-promo-desc {
    margin: 0 0 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}

.app-promo-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* 高对比主按钮 + 呼吸光圈动效 */
.app-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 999px;
    background-color: var(--white, #ffffff);
    color: #5b3cc4;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    animation: appPromoPulse 2.4s ease-in-out infinite;
}

.app-promo-btn:hover,
.app-promo-btn:focus {
    background-color: var(--white, #ffffff);
    color: #6c5ce7;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

@keyframes appPromoPulse {
    0%, 100% { box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18), 0 0 0 0 rgba(255, 255, 255, 0.55); }
    50% { box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18), 0 0 0 10px rgba(255, 255, 255, 0); }
}

.app-promo-version {
    align-self: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.app-promo-qr {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.app-promo-qr-box {
    box-sizing: content-box;
    width: 120px;
    height: 120px;
    padding: 8px;
    background-color: var(--white, #ffffff);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.app-promo-qr-box img,
.app-promo-qr-box canvas {
    display: block;
    width: 120px !important;
    height: 120px !important;
}

.app-promo-qr-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.92);
    text-align: center;
}

/* 移动端：纵向排列、二维码居中显示 */
@media (max-width: 768px) {
    .app-promo-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px 18px;
    }

    .app-promo-qr {
        align-self: center;
    }

    .app-promo-title {
        font-size: 1.25rem;
    }

    .app-promo-btn {
        width: 100%;
        justify-content: center;
    }

    .app-promo-version {
        align-self: flex-start;
    }
}

/* ---------- 内联横条形态（频道页方案 A：无二维码） ---------- */
.app-promo-inline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3498db 0%, #6c5ce7 100%);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.28);
    color: var(--white, #ffffff);
}

.app-promo-inline-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.app-promo-inline-text {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.app-promo-inline-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--white, #ffffff);
}

.app-promo-inline-version {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
}

.app-promo-inline .app-promo-btn {
    flex: 0 0 auto;
    padding: 10px 20px;
    font-size: 0.95rem;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .app-promo-inline {
        flex-wrap: wrap;
    }

    .app-promo-inline .app-promo-btn {
        width: 100%;
        justify-content: center;
    }
}
