/* --- 1. PWA БАННЕР УСТАНОВКИ --- */
#pwa-install-banner {
    display: none; position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
    background: #2c3e50; color: #fff; padding: 20px; border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4); z-index: 10000; width: 90%; max-width: 360px; text-align: center;
    backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1);
}
.pwa-btn-group { display: flex; gap: 10px; justify-content: center; margin-top: 15px; }
.btn-pwa-later { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 8px 15px; border-radius: 20px; cursor: pointer; font-size: 13px; }
.btn-pwa-install { background: #3498db; border: none; color: #fff; padding: 8px 25px; border-radius: 20px; font-weight: bold; cursor: pointer; font-size: 13px; box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4); }

/* --- 2. НИЖНЕЕ МЕНЮ (Только моб) --- */
.app-bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.96); border-top: 1px solid #e0e0e0;
    height: 60px; z-index: 9900; padding-bottom: env(safe-area-inset-bottom);
    backdrop-filter: blur(10px);
}
.app-nav-list {
    display: flex; height: 100%; list-style: none; margin: 0; padding: 0;
    justify-content: space-around; align-items: center;
}
.app-nav-item {
    flex: 1; text-align: center; text-decoration: none; color: #95a5a6;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; -webkit-tap-highlight-color: transparent; transition: color 0.2s;
}
.app-nav-icon { width: 24px; height: 24px; margin-bottom: 3px; fill: currentColor; }
.app-nav-text { font-size: 10px; font-weight: 600; }
.app-nav-item.active { color: #2c3e50; }
.app-nav-item.active .app-nav-icon { fill: #3498db; }

/* --- 3. КНОПКА НАЗАД (Только PWA) --- */
.pwa-back-btn { 
    display: none; position: fixed; top: 12px; left: 12px; z-index: 9999;
    width: 36px; height: 36px; background: rgba(255, 255, 255, 0.9); border-radius: 50%; 
    align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    color: #333; text-decoration: none; backdrop-filter: blur(4px); border: 1px solid #eee;
}
.pwa-back-btn svg { width: 18px; height: 18px; fill: currentColor; margin-right: 2px; }

/* АДАПТАЦИЯ */
@media (max-width: 768px) {
    .app-bottom-nav { display: block; }
    body { padding-bottom: 70px !important; } 
    footer { padding-bottom: 70px; }
    /* Если есть реклама, поднимаем её */
    .bottom-sticky-ad { bottom: 65px !important; }
}

@media all and (display-mode: standalone) {
    .pwa-back-btn.visible { display: flex; }
}