/* ==================== App Download Section ==================== */

#download {
    scroll-margin-top: 70px;
}

.app-download {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, #0a0a0a 0%, #1a0505 45%, #000000 100%);
    color: var(--primary-white);
}

.app-download::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 55%;
    height: 70%;
    background: radial-gradient(ellipse, rgba(217, 0, 0, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.app-download::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-red), var(--accent-gold), var(--primary-red), transparent);
}

.app-download-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.app-download-copy {
    animation: fadeInUp 0.8s ease;
}

.app-download-eyebrow {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 16px;
    padding: 6px 14px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 2px;
}

.app-download-title {
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.app-download-title span {
    color: var(--primary-red);
}

.app-download-app-name {
    font-size: clamp(22px, 3vw, 32px);
    color: var(--accent-gold);
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 24px;
}

.app-download-desc {
    font-size: 17px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 28px;
    max-width: 480px;
}

.app-download-features {
    list-style: none;
    margin-bottom: 36px;
}

.app-download-features li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.app-download-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    background: var(--primary-red);
    transform: rotate(45deg);
}

.app-store-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: var(--primary-white);
    color: var(--primary-black);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.app-store-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(217, 0, 0, 0.35);
    background: var(--primary-white);
    color: var(--primary-black);
}

.app-store-link svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.app-store-link-text small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
    line-height: 1.2;
}

.app-store-link-text strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
}

/* iPhone mockup (latest style: rounded + Dynamic Island) */
.app-download-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.8s ease 0.15s both;
}

.iphone-mockup {
    --frame-w: 300px;
    --bezel: 10px;
    --radius: 52px;
    position: relative;
    width: var(--frame-w);
    padding: var(--bezel);
    background: linear-gradient(160deg, #3d3d3f 0%, #1c1c1e 35%, #0d0d0f 100%);
    border-radius: var(--radius);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 40px 80px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.iphone-mockup::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 120px;
    width: 3px;
    height: 56px;
    background: #2a2a2c;
    border-radius: 2px 0 0 2px;
    box-shadow: 0 72px 0 #2a2a2c;
}

.iphone-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 19.5;
    border-radius: calc(var(--radius) - var(--bezel));
    overflow: hidden;
    background: #0a0a0a;
}

/* 装饰性灵动岛，不压住截图内容 */
.iphone-island {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 92px;
    height: 26px;
    background: #000;
    border-radius: 18px;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* 安全区内展示完整截图，避开圆角外框与底部横条 */
.iphone-screenshots {
    position: absolute;
    top: 11%;
    left: 5%;
    right: 5%;
    bottom: 7%;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
}

.iphone-screenshots img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.iphone-screenshots img.active {
    opacity: 1;
}

.iphone-home-bar {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    z-index: 10;
}

.iphone-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.iphone-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: var(--transition);
}

.iphone-dots button.active,
.iphone-dots button:hover {
    background: var(--primary-red);
    transform: scale(1.2);
}

@media (max-width: 992px) {
    .app-download-inner {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
        padding: 60px 20px;
    }

    .app-download-desc,
    .app-download-features {
        margin-left: auto;
        margin-right: auto;
    }

    .app-download-features li {
        text-align: left;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .iphone-mockup {
        --frame-w: 260px;
    }
}

@media (max-width: 480px) {
    .app-download-inner {
        padding: 48px 16px;
    }

    .iphone-mockup {
        --frame-w: 220px;
        --radius: 44px;
    }

    .iphone-screenshots {
        top: 10%;
        left: 4%;
        right: 4%;
        bottom: 6%;
        border-radius: 22px;
    }

    .iphone-island {
        width: 76px;
        height: 22px;
    }
}
