.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, rgba(11, 17, 32, 0.96) 0%, rgba(15, 30, 50, 0.98) 100%);
    color: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(34, 211, 238, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    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(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.28);
    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;
    color: rgba(255, 255, 255, 0.78);
}

.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: linear-gradient(135deg, #22D3EE, #06B6D4);
    color: #0B1120;
    white-space: nowrap;
}

.pwa-install-btn:hover {
    filter: brightness(1.05);
}

.pwa-install-dismiss {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    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: #0B1120;
    background: linear-gradient(135deg, #22D3EE, #06B6D4);
    box-shadow: 0 10px 28px rgba(34, 211, 238, 0.35);
}

.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(5, 8, 16, 0.72);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.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.35);
}

.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: #0B1120;
    border: 2px solid #22D3EE;
}

.pwa-modal-install:hover {
    background: #ECFEFF;
}

.pwa-modal-install.is-native {
    background: linear-gradient(135deg, #22D3EE, #06B6D4);
    color: #0B1120;
    border-color: transparent;
}

.pwa-modal-install.is-native:hover {
    filter: brightness(1.05);
}

.pwa-steps-highlight {
    animation: pwaStepsPulse 0.9s ease;
}

@keyframes pwaStepsPulse {
    0%, 100% { background: transparent; }
    50% { background: #ECFEFF; 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: #0B1120;
    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;
    }
}
