/* ================= 基础 & 隐藏 ================= */
.sxpwa-install, .sxpwa-offline, .sxpwa-update, .sxpwa-online{
  position: fixed;
  z-index: 2147483000;
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial;
}
.hidden { display: none !important; }

/* ================= 安装横幅（底部整条） ================= */
.sxpwa-install{
  left: 0; right: 0; bottom: 0; padding: 12px;
  background: #0f172a; color: #fff;
  display: flex; justify-content: center;
}
.sxpwa-install-bar{ display: flex; gap: 12px; align-items: center; }
.sxpwa-install-bar .actions button{
  margin-left: 8px; padding: 6px 10px; border: 0; border-radius: 8px; cursor: pointer;
}
.sxpwa-install-bar [data-action="install"]{ background: #22c55e; color: #082f1d; }
.sxpwa-install-bar [data-action="close"]{ background: #e5e7eb; color: #111; }

/* ================= 科技感 Toast（统一造型） ================= */
/* 基础造型：玻璃质感 + 柔阴影 + 微动效 */
.sxpwa-toast{
  right: 18px; bottom: 18px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(22,22,26,0.55), rgba(22,22,26,0.42));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 30px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.12);
  color: #fff;
  animation: sxpwa-toast-in .25s ease-out both;
}
.sxpwa-toast .icon{
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  opacity: .95;
}
.sxpwa-toast .body{ display: grid; gap: 2px; }
.sxpwa-toast .title{ font-weight: 600; font-size: 14px; letter-spacing: .2px; }
.sxpwa-toast .text{ font-size: 12px; opacity: .9; }

/* 变体：离线（深色） */
.sxpwa-offline{
  right: 18px; bottom: 18px;
  background: linear-gradient(180deg, rgba(17,17,17,0.70), rgba(17,17,17,0.56));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 30px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.12);
}
/* 变体：在线（绿色高亮） */
.sxpwa-online{
  right: 18px; bottom: 18px;
  background: linear-gradient(180deg, rgba(16,185,129,0.85), rgba(16,185,129,0.70));
  color: #062e22;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 30px rgba(16,185,129,.25), 0 2px 6px rgba(16,185,129,.18);
}

/* 更新提示沿用 toast 视觉（按钮样式保留） */
.sxpwa-update{
  right: 18px; bottom: 18px;
  background: linear-gradient(180deg, rgba(22,22,26,0.55), rgba(22,22,26,0.42));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 30px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.12);
  color: #fff; padding: 12px 14px; border-radius: 14px;
  animation: sxpwa-toast-in .25s ease-out both;
}
.sxpwa-update button{
  margin-left: 8px; padding: 6px 10px; border: 0; border-radius: 8px;
  background: #22c55e; color: #082f1d; cursor: pointer;
}

/* 动效 */
@keyframes sxpwa-toast-in{
  from{ transform: translateY(8px) scale(.98); opacity: 0; }
  to  { transform: translateY(0)  scale(1);    opacity: 1; }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce){
  .sxpwa-toast, .sxpwa-update{ animation: none; }
}
