/* ========================================================================
   download.css —— YuanFit 下载页(与 App 同风格:亮色淡彩 + 蓝紫主色)
   ======================================================================== */

:root {
    --bg-lavender: #E9E3F7;
    --bg-mint: #E4F5EC;
    --bg-card: #ffffff;
    --bg-card-2: #F4F7FB;
    --accent-blue: #3392FF;
    --accent-purple: #8E7BFF;
    --text-title: #22303F;
    --text-body: #3D4B5C;
    --text-sub: #6B7A90;
    --text-muted: #8A97A8;
    --border-soft: rgba(34, 48, 63, 0.08);
    --border-blue: rgba(51, 146, 255, 0.35);
    --gradient: linear-gradient(135deg, #3392FF 0%, #8E7BFF 100%);
    --gradient-soft: linear-gradient(135deg, rgba(51, 146, 255, 0.12) 0%, rgba(142, 123, 255, 0.12) 100%);
    --shadow-card: 0 4px 12px rgba(30, 41, 59, 0.06);

    --font-zh: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    --font-en: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html,
body {
    background: linear-gradient(180deg, var(--bg-lavender) 0%, var(--bg-mint) 100%);
    background-attachment: fixed;
    color: var(--text-body);
    font-family: var(--font-zh), var(--font-en);
    font-size: 16px;
    min-height: 100vh;
}

/* ========================================================================
   Lang switch(顶部)
   ======================================================================== */
.lang-top {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lang-switch__btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sub);
    border-radius: 999px;
    transition: color 0.2s, background-color 0.2s;
    letter-spacing: 0.5px;
}

.lang-switch__btn.is-active {
    background: var(--gradient);
    color: #fff;
}

/* ========================================================================
   Main download layout
   ======================================================================== */
.download {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    position: relative;
    overflow: hidden;
}

/* Background glow blobs —— 蓝 / 紫 柔光,呼应 App 淡彩底 */
.download__bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.download__bg-glow--cyan {
    width: 400px;
    height: 400px;
    background: rgba(51, 146, 255, 0.25);
    top: -100px;
    left: -100px;
}

.download__bg-glow--purple {
    width: 400px;
    height: 400px;
    background: rgba(142, 123, 255, 0.25);
    bottom: -100px;
    right: -100px;
}

/* ========================================================================
   Download card(App 指标卡同款:白卡 + 圆角 28 + 柔影)
   ======================================================================== */
.download__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid #ffffff;
    border-radius: 28px;
    padding: 48px 32px 36px;
    text-align: center;
    box-shadow:
        0 20px 50px rgba(30, 41, 59, 0.12);
}

@media (max-width: 480px) {
    .download__card {
        padding: 40px 24px 32px;
    }
}

/* ========================================================================
   Logo(带蓝紫渐变光环)
   ======================================================================== */
.download__logo-wrap {
    width: 130px;
    height: 130px;
    margin: 0 auto 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download__logo-ring {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: var(--gradient);
    padding: 2px;
    box-shadow:
        0 0 40px rgba(51, 146, 255, 0.35),
        0 0 80px rgba(142, 123, 255, 0.25);
    animation: pulse 4s ease-in-out infinite;
}

.download__logo-ring::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 26px;
    background: var(--bg-card);
}

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

.download__logo {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    border-radius: 22px;
    object-fit: cover;
}

/* ========================================================================
   Title / tagline
   ======================================================================== */
.download__title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.download__tagline {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 24px;
}

/* ========================================================================
   Feature list
   ======================================================================== */
.download__features {
    text-align: left;
    margin: 0 auto 32px;
    padding: 18px 20px;
    background: var(--bg-card-2);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    max-width: 320px;
}

.download__features li {
    font-size: 13px;
    color: var(--text-body);
    line-height: 1.9;
    padding-left: 20px;
    position: relative;
}

.download__features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-blue);
    box-shadow: 0 0 8px rgba(51, 146, 255, 0.5);
}

/* ========================================================================
   Download buttons
   ======================================================================== */
.download__btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-align: left;
}

.dl-btn:hover {
    transform: translateY(-2px);
    border-color: var(--border-blue);
    box-shadow: 0 8px 20px rgba(51, 146, 255, 0.15);
}

.dl-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-title);
    flex-shrink: 0;
}

.dl-btn__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.dl-btn__small {
    font-size: 10px;
    color: var(--text-sub);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.dl-btn__big {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-title);
}

/* Highlighted primary button (iOS) —— App 同款蓝→紫渐变 + 白字 */
.dl-btn--ios {
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(51, 146, 255, 0.35);
}

.dl-btn--ios .dl-btn__small,
.dl-btn--ios .dl-btn__big {
    color: #fff;
}

.dl-btn--ios .dl-btn__icon {
    color: #fff;
}

.dl-btn--ios:hover {
    background: var(--gradient);
    border-color: transparent;
}

/* ========================================================================
   Tip text
   ======================================================================== */
.download__tip {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.7;
    max-width: 320px;
    margin: 0 auto;
}

/* ========================================================================
   Back to home
   ======================================================================== */
.download__home {
    position: relative;
    z-index: 1;
    margin-top: 32px;
    font-size: 14px;
    color: var(--text-sub);
    transition: color 0.2s;
}

.download__home:hover {
    color: var(--accent-blue);
}

/* ========================================================================
   WeChat tip overlay(微信内打开的引导浮层,保持深色遮罩保证提示醒目)
   ======================================================================== */
.weixin-tip {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding: 5% 5% 0;
}

.weixin-tip.is-show {
    display: flex;
}

.weixin-tip img {
    max-width: 100%;
    max-height: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .download__logo-ring {
        animation: none;
    }
}
