:root {
  --pp-safe-top: env(safe-area-inset-top, 0px);
  --pp-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html,
body {
  overscroll-behavior-y: contain;
}

body.pp-body {
  padding-top: var(--pp-safe-top);
  padding-bottom: calc(var(--pp-bottom-nav-h) + var(--pp-safe-bottom));
}

.pp-standalone .pp-header {
  position: sticky;
  top: 0;
}

.pp-standalone .pp-footer {
  display: none;
}

.pp-app-splash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-content: center;
  gap: 0.7rem;
  background: radial-gradient(circle at 30% 20%, rgba(184, 255, 0, 0.2), transparent 45%),
    radial-gradient(circle at 70% 80%, rgba(34, 211, 238, 0.16), transparent 42%),
    linear-gradient(180deg, #020508 0%, #080f1b 100%);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.pp-app-splash img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(184, 255, 0, 0.45));
  animation: ppSplashPulse 1.2s ease-in-out infinite alternate;
}

.pp-app-splash p {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d6ffd4;
}

.pp-app-splash.is-hidden {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
}

.pp-follow-live-card {
  margin: 0 0 1rem;
  padding: 0.95rem;
  border: 1px solid rgba(184, 255, 0, 0.28);
  border-radius: 1rem;
  background: linear-gradient(155deg, rgba(9, 14, 24, 0.92), rgba(4, 8, 16, 0.96));
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15), 0 0 24px rgba(34, 197, 94, 0.18);
}

.pp-follow-live-head {
  display: flex;
  gap: 0.6rem;
}

.pp-follow-live-btn {
  flex: 1;
  border: 1px solid rgba(34, 197, 94, 0.42);
  border-radius: 0.95rem;
  min-height: 52px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #d8ffe3;
  background: linear-gradient(130deg, rgba(22, 163, 74, 0.3), rgba(8, 35, 18, 0.85));
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: ppFollowPulse 1.8s ease-in-out infinite;
}

.pp-follow-live-btn:active {
  transform: scale(0.97);
}

.pp-follow-live-btn.is-active {
  background: linear-gradient(130deg, rgba(34, 197, 94, 0.45), rgba(16, 43, 22, 0.96));
  color: #ecffef;
  box-shadow: 0 0 22px rgba(34, 197, 94, 0.5);
}

.pp-follow-settings-btn {
  width: 52px;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #e5f1ff;
}

.pp-follow-live-meta {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.pp-following-count {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  color: #d4f6dc;
}

.pp-following-count strong {
  color: #fff;
}

.pp-following-avatars {
  display: flex;
  gap: 0.35rem;
}

.pp-follow-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.28), rgba(34, 211, 238, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #f5fbff;
  font-size: 0.7rem;
  font-weight: 700;
}

.pp-follow-state {
  margin-top: 0.7rem;
  color: #95aac7;
  font-size: 0.9rem;
}

.pp-follow-preferences {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 0.45rem;
}

.pp-follow-preferences label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #d8e7ff;
  font-size: 0.9rem;
}

.pp-follow-save-btn {
  margin-top: 0.3rem;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 0.7rem;
  min-height: 40px;
  background: rgba(34, 197, 94, 0.14);
  color: #deffe5;
  font-weight: 700;
}

.pp-install-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  place-items: center;
}

.pp-install-modal.is-open {
  display: grid;
}

.pp-install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(7px);
}

.pp-install-card {
  position: relative;
  width: min(92vw, 420px);
  border-radius: 1.2rem;
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: linear-gradient(180deg, rgba(5, 8, 16, 0.98), rgba(12, 18, 31, 0.98));
  padding: 1.2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.52), 0 0 30px rgba(34, 197, 94, 0.25);
}

.pp-install-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #bbffcd;
  font-weight: 800;
}

.pp-install-card h3 {
  margin: 0;
  font-weight: 800;
}

.pp-install-card p {
  margin-top: 0.6rem;
  color: #a8bad3;
}

.pp-install-actions {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
}

.pp-install-primary,
.pp-install-secondary {
  min-height: 48px;
  border-radius: 0.85rem;
  font-weight: 700;
}

.pp-install-primary {
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: linear-gradient(130deg, rgba(34, 197, 94, 0.4), rgba(6, 36, 17, 0.94));
  color: #e8ffed;
}

.pp-install-secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #dbe9ff;
}

.pp-install-ios-guide {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

.pp-install-ios-step {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  color: #d6e4f8;
}

.pp-install-ios-step span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
}

@keyframes ppSplashPulse {
  from { transform: scale(0.98); }
  to { transform: scale(1.05); }
}

@keyframes ppFollowPulse {
  0% { box-shadow: 0 0 12px rgba(34, 197, 94, 0.28); }
  50% { box-shadow: 0 0 22px rgba(34, 197, 94, 0.52); }
  100% { box-shadow: 0 0 12px rgba(34, 197, 94, 0.28); }
}
