/* Popup giới thiệu app Mèo Béo Studio (views/partials/appPopup.ejs) */
.mapp-overlay {
    position: fixed;
    inset: 0;
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(92, 75, 71, 0.38);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: mappFade 0.25s ease;
}

.mapp-overlay[hidden] {
    display: none;
}

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

@keyframes mappPop {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.mapp-card {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: linear-gradient(160deg, #fffcfb 0%, #fff5f2 100%);
    border: 2px solid #ffe6e0;
    border-radius: 28px;
    box-shadow: 0 24px 60px -18px rgba(214, 125, 99, 0.55);
    animation: mappPop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.mapp-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #8a7772;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(214, 125, 99, 0.18);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.mapp-close:hover {
    background: #fbc1b0;
    color: #fff;
    transform: rotate(90deg);
}

/* Sân khấu: 3 màn hình app xếp quạt, cắt chân để như điện thoại "nhô" lên */
.mapp-stage {
    position: relative;
    height: 178px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffd6e6 0%, #fad0c4 55%, #ffe9b3 100%);
}

.mapp-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.55;
}

.mapp-blob.b1 {
    width: 120px;
    height: 120px;
    left: -30px;
    top: -40px;
    background: #fff5f2;
}

.mapp-blob.b2 {
    width: 90px;
    height: 90px;
    right: -20px;
    bottom: 10px;
    background: #e3d4f0;
}

.mapp-shot {
    position: absolute;
    left: 50%;
    width: 104px;
    height: auto;
    aspect-ratio: 240 / 520;
    border-radius: 16px;
    border: 3px solid #fff;
    background: #fff7f5;
    box-shadow: 0 10px 24px -8px rgba(214, 125, 99, 0.5);
}

.mapp-shot.mid {
    z-index: 2;
    top: 22px;
    width: 116px;
    margin-left: -58px;
}

.mapp-shot.left {
    top: 40px;
    margin-left: -142px;
    transform: rotate(-9deg);
}

.mapp-shot.right {
    top: 40px;
    margin-left: 38px;
    transform: rotate(9deg);
}

.mapp-icon {
    position: relative;
    z-index: 2;
    display: block;
    width: 64px;
    height: 64px;
    margin: -32px auto 0;
    border-radius: 16px;
    border: 3px solid #fff;
    background: #fff7f5;
    box-shadow: 0 8px 20px -6px rgba(214, 125, 99, 0.5);
}

.mapp-body {
    padding: 10px 22px 16px;
    text-align: center;
}

.mapp-flags {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.mapp-flag {
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9a6b1e;
    background: #ffe9b3;
    padding: 5px 12px;
    border-radius: 999px;
}

.mapp-flag.free {
    color: #1e6b42;
    background: #b8e0c8;
}

.mapp-title {
    margin: 10px 0 4px;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    color: #e59882;
    text-wrap: balance;
}

.mapp-sub {
    margin: 0 0 12px;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #8a7772;
}

.mapp-feats {
    list-style: none;
    margin: 0 0 16px;
    padding: 10px 12px;
    display: grid;
    gap: 8px;
    text-align: left;
    background: #fff;
    border: 1px dashed #ffe6e0;
    border-radius: 18px;
}

.mapp-feats li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #5c4b47;
}

.mapp-fi {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
}

.mapp-fi svg {
    width: 16px;
    height: 16px;
}

.mapp-fi.yellow { background: #ffe9b3; color: #9a6b1e; }
.mapp-fi.mint { background: #b8e0c8; color: #1e6b42; }
.mapp-fi.pink { background: #ffd6e6; color: #b34a6b; }

.mapp-cta {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fad0c4 0%, #fbc1b0 100%);
    box-shadow: 0 6px 18px rgba(250, 208, 196, 0.6);
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 0.98rem;
    font-weight: 800;
    color: #5c4b47;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s;
}

.mapp-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 22px rgba(250, 208, 196, 0.75);
    color: #5c4b47;
}

.mapp-cta svg {
    width: 18px;
    height: 18px;
    margin-top: -2px;
}

.mapp-later {
    margin-top: 8px;
    border: none;
    background: none;
    padding: 6px 10px;
    font-size: 0.8rem;
    color: #8a7772;
    cursor: pointer;
    text-decoration: underline dotted;
}

.mapp-later:hover {
    color: #d67d63;
}

@media (max-width: 480px) {
    .mapp-card {
        border-radius: 24px;
    }

    .mapp-body {
        padding: 8px 18px 12px;
    }

    .mapp-title {
        font-size: 1.14rem;
    }
}

/* Màn hình thấp (iPhone SE, điện thoại xoay ngang): thu sân khấu cho vừa, khỏi phải cuộn */
@media (max-height: 640px) {
    .mapp-stage {
        height: 128px;
    }

    .mapp-shot { width: 84px; }
    .mapp-shot.mid { top: 14px; width: 94px; margin-left: -47px; }
    .mapp-shot.left { top: 28px; margin-left: -116px; }
    .mapp-shot.right { top: 28px; margin-left: 32px; }

    .mapp-icon {
        width: 54px;
        height: 54px;
        margin-top: -27px;
    }

    .mapp-sub {
        display: none;
    }

    .mapp-feats {
        margin-bottom: 12px;
    }
}
