/* PlayGames.Today -  install prompt (brand-matched) */
:root {
  --pgt-purple: #251263;   /* deep purple */
  --pgt-cyan: #33c7f5;     /* bright cyan */
  --pgt-gold: #ec9a15;     /* warm gold */
  --pgt-ice: #f1f2f4;      /* near-white */
}

#pwa-toast {
  position: fixed;
  right: 18px;
  /* Mobile-safe: lift above browser bars + iOS home indicator */
  bottom: calc(18px + env(safe-area-inset-bottom, 0px) + 10px);
  width: min(360px, calc(100vw - 36px));
  z-index: 999999;
  display: none;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

#pwa-toast .pwa-card {
  background: linear-gradient(180deg, rgba(18, 18, 20, 0.88), rgba(12, 12, 14, 0.92));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  overflow: hidden;
  transform: translateY(16px);
  opacity: 0;
  transition: transform .28s ease, opacity .28s ease;
}

#pwa-toast.show .pwa-card {
  transform: translateY(0);
  opacity: 1;
}

#pwa-toast .pwa-top {
  display: flex;
  gap: 12px;
  padding: 14px 14px 10px 14px;
  align-items: flex-start;
}

#pwa-toast .pwa-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 auto;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(51,199,245,0.22), rgba(118,51,193,0.10)),
    rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  overflow: hidden;
}

#pwa-toast .pwa-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#pwa-toast .pwa-text {
  flex: 1 1 auto;
  min-width: 0;
}

#pwa-toast .pwa-title {
  font-weight: 900;
  font-size: 14px;
  line-height: 1.2;
  margin: 1px 0 4px 0;
  letter-spacing: 0.2px;
}

#pwa-toast .pwa-body {
  font-size: 12.5px;
  line-height: 1.35;
  opacity: .92;
}

#pwa-toast .pwa-close {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 10px;
}

#pwa-toast .pwa-close:hover {
  background: rgba(255,255,255,0.10);
}

#pwa-toast .pwa-actions {
  display: flex;
  gap: 10px;
  padding: 0 14px 14px 14px;
  justify-content: flex-end;
  align-items: center;
}

#pwa-toast .pwa-btn {
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #fff;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#pwa-toast .pwa-btn:active { transform: translateY(1px); }

#pwa-toast .pwa-btn.primary {
  position: relative;
  border: 0;
  color: #07080a;
  background: linear-gradient(90deg, var(--pgt-cyan), var(--pgt-gold));
  box-shadow: 0 10px 28px rgba(51,199,245,0.18);
  overflow: hidden;
}

#pwa-toast .pwa-btn.primary:hover {
  box-shadow: 0 12px 34px rgba(51,199,245,0.24);
}

#pwa-toast .pwa-btn.ghost:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
}

/* Sparkle sweep */
#pwa-toast .pwa-btn.primary::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -60%;
  width: 60%;
  height: 180%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.55) 45%,
    rgba(255,255,255,0) 70%
  );
  transform: rotate(18deg);
  animation: pwa-sparkle 3.4s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.75;
}

@keyframes pwa-sparkle {
  0%   { transform: translateX(0) rotate(18deg); opacity: 0; }
  10%  { opacity: 0.75; }
  35%  { transform: translateX(260%) rotate(18deg); opacity: 0; }
  100% { transform: translateX(260%) rotate(18deg); opacity: 0; }
}

@media (max-width: 480px) {
  #pwa-toast {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px) + 10px);
  }
}
