#app-download-popup {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#app-download-popup.is-visible {
    display: flex;
    animation: appPopupFadeIn 0.35s ease;
}

.app-download-popup__card {
    position: relative;
    width: min(920px, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow: auto;
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fffe 55%, #eefcfb 100%);
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(45, 195, 186, 0.15);
    animation: appPopupSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-download-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease, background 0.2s ease;
}

.app-download-popup__close:hover {
    transform: scale(1.05);
    background: #fff;
}

.app-download-popup__inner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 0;
    min-height: 420px;
}

.app-download-popup__visual {
    position: relative;
    overflow: hidden;
    border-radius: 24px 0 0 24px;
    background: linear-gradient(160deg, #2dc3ba 0%, #1f9f98 45%, #157a75 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.app-download-popup__visual::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    top: -60px;
    left: -60px;
}

.app-download-popup__visual::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    bottom: -40px;
    right: -30px;
}

.app-download-popup__image {
    position: relative;
    z-index: 1;
    width: min(100%, 320px);
    height: auto;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.22));
}

.app-download-popup__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2.25rem;
}

.app-download-popup__badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(45, 195, 186, 0.12);
    color: #0f766e;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.app-download-popup__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.6rem, 2.4vw, 2.15rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.app-download-popup__subtitle {
    margin: 0 0 1.75rem;
    font-size: 1rem;
    line-height: 1.65;
    color: #64748b;
}

.app-download-popup__stores {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.app-download-popup__store-link {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-download-popup__store-link:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

.app-download-popup__store-link img {
    height: 52px;
    width: auto;
    display: block;
}

.app-download-popup__later {
    align-self: flex-start;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.25rem 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.app-download-popup__later:hover {
    color: #64748b;
}

html[dir="rtl"] .app-download-popup__close {
    right: auto;
    left: 14px;
}

html[dir="rtl"] .app-download-popup__visual {
    border-radius: 0 24px 24px 0;
}

@keyframes appPopupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes appPopupSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 767px) {
    .app-download-popup__inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .app-download-popup__visual {
        border-radius: 24px 24px 0 0;
        padding: 1.5rem 1rem 1rem;
    }

    html[dir="rtl"] .app-download-popup__visual {
        border-radius: 24px 24px 0 0;
    }

    .app-download-popup__content {
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .app-download-popup__image {
        width: min(72%, 240px);
    }

    .app-download-popup__store-link img {
        height: 46px;
    }
}
