.pwa-install-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 9998;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4C1D95 0%, #7C3AED 55%, #A855F7 100%);
    color: #fff;
    box-shadow: 0 16px 40px rgba(76, 29, 149, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: pwaSlideUp 0.35s ease;
}

.pwa-install-bar.is-visible {
    display: flex;
}

.pwa-install-bar.has-bottom-nav {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

.pwa-install-bar__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.pwa-install-bar__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-install-bar__text {
    flex: 1;
    min-width: 0;
}

.pwa-install-bar__title {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.pwa-install-bar__sub {
    font-size: 11px;
    opacity: 0.88;
    margin-top: 2px;
    line-height: 1.35;
}

.pwa-install-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-btn {
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    background: #fff;
    color: #5B21B6;
    white-space: nowrap;
}

.pwa-install-btn:hover {
    filter: brightness(0.98);
}

.pwa-install-dismiss {
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-install-fab {
    position: fixed;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 9997;
    display: none;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.45);
}

.pwa-install-fab.has-bottom-nav {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
}

.pwa-install-fab.is-visible {
    display: inline-flex;
}

.pwa-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 10, 30, 0.55);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}

.pwa-modal-backdrop.is-open {
    display: flex;
}

.pwa-modal {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    color: #1E1B2E;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.pwa-modal h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
}

.pwa-modal p {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.55;
    color: #6B6884;
}

.pwa-modal ol {
    margin: 0 0 16px;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.6;
    color: #1E1B2E;
}

.pwa-modal-install {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    background: #fff;
    color: #5B21B6;
    border: 2px solid #7C3AED;
}

.pwa-modal-install:hover {
    background: #F5F3FF;
}

.pwa-modal-install.is-native {
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    color: #fff;
    border-color: transparent;
}

.pwa-modal-install.is-native:hover {
    filter: brightness(1.05);
    background: linear-gradient(135deg, #7C3AED, #A855F7);
}

.pwa-steps-highlight {
    animation: pwaStepsPulse 0.9s ease;
}

@keyframes pwaStepsPulse {
    0%, 100% { background: transparent; }
    50% { background: #F5F3FF; border-radius: 8px; }
}

.pwa-modal-close {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    color: #fff;
}

@keyframes pwaSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .pwa-install-bar {
        left: auto;
        right: 20px;
        max-width: 420px;
    }
}
