body.ppm-lock { overflow: hidden; }

.ppm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 6, 10, .72);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.ppm-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .25s ease, visibility 0s; }

.ppm {
  --ppm-accent: #4fea9f;
  --ppm-accent-rgb: 79, 234, 159;
  --ppm-gold: #f5b82e;
  --ppm-text: #eceef5;
  --ppm-muted: #8f91a6;
  --ppm-line: rgba(255, 255, 255, .08);
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 26px;
  border: 1px solid var(--ppm-line);
  background:
    radial-gradient(120% 220px at 50% 0, rgba(245, 184, 46, .16), transparent 70%),
    linear-gradient(180deg, #23232c 0%, #1a1a21 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05);
  color: var(--ppm-text);
  font-family: inherit;
  text-align: center;
  transform: translateY(14px) scale(.95);
  transition: transform .32s cubic-bezier(.2, .9, .3, 1.2);
  scrollbar-width: none;
}
.ppm::-webkit-scrollbar { display: none; }
.ppm-overlay.is-open .ppm { transform: none; }
.ppm *, .ppm *::before, .ppm *::after { box-sizing: border-box; }
.ppm button { font-family: inherit; }
.ppm [hidden] { display: none !important; }

.ppm__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--ppm-line);
  border-radius: 11px;
  background: rgba(0, 0, 0, .25);
  color: #a9abbd;
  font-size: 20px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .2s ease;
}
.ppm__close:hover { background: rgba(255, 255, 255, .1); color: #fff; transform: rotate(90deg); }

.ppm__hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  overflow: hidden;
}
.ppm__rays {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 360px;
  height: 360px;
  margin: -180px 0 0 -180px;
  background: repeating-conic-gradient(from 0deg, rgba(245, 184, 46, .12) 0deg 8deg, transparent 8deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 10%, transparent 60%);
  mask: radial-gradient(circle, #000 10%, transparent 60%);
  animation: ppmSpin 30s linear infinite;
  animation-play-state: paused;
}
.ppm__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 184, 46, .45), rgba(245, 184, 46, 0) 70%);
  filter: blur(6px);
  transition: background .4s ease;
}
.ppm__gift {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .5));
  animation: ppmFloat 3.2s ease-in-out infinite;
  animation-play-state: paused;
}
.ppm__spark {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff3c4;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
  animation: ppmTwinkle 2.4s ease-in-out infinite;
  animation-play-state: paused;
}
.ppm__spark--1 { top: 30px; left: 32%; }
.ppm__spark--2 { top: 44px; right: 30%; width: 14px; height: 14px; animation-delay: .6s; }
.ppm__spark--3 { bottom: 34px; left: 36%; width: 8px; height: 8px; animation-delay: 1.2s; }
.ppm__spark--4 { bottom: 42px; right: 34%; animation-delay: 1.8s; }
.ppm-overlay.is-open .ppm__rays,
.ppm-overlay.is-open .ppm__gift,
.ppm-overlay.is-open .ppm__spark { animation-play-state: running; }
.ppm.is-success .ppm__glow { background: radial-gradient(circle, rgba(var(--ppm-accent-rgb), .5), rgba(var(--ppm-accent-rgb), 0) 70%); }
.ppm.is-success .ppm__gift { animation: ppmPop .6s cubic-bezier(.2, .9, .3, 1.4), ppmFloat 3.2s ease-in-out .6s infinite; }
@keyframes ppmSpin { to { transform: rotate(360deg); } }
@keyframes ppmFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ppmFloat { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes ppmTwinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }
@keyframes ppmPop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

.ppm__stage { padding: 0 24px 22px; }
.ppm__head { margin-bottom: 18px; }
.ppm__title { margin: 0 0 6px; color: #fff; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.ppm__sub { margin: 0 auto; max-width: 320px; color: var(--ppm-muted); font-size: 13px; line-height: 1.5; }

.ppm__field {
  position: relative;
  display: flex;
  align-items: center;
  height: 58px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, .1);
  background: rgba(0, 0, 0, .3);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.ppm__field:focus-within {
  border-color: rgba(var(--ppm-accent-rgb), .6);
  box-shadow: 0 0 0 4px rgba(var(--ppm-accent-rgb), .12);
  background: rgba(0, 0, 0, .38);
}
.ppm__field.is-error { border-color: rgba(255, 107, 107, .65); box-shadow: 0 0 0 4px rgba(255, 107, 107, .12); }
.ppm__field.is-shaking { animation: ppmShake .45s ease; }
@keyframes ppmShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.ppm__field-icon { flex: 0 0 48px; color: var(--ppm-muted); font-size: 21px; transition: color .2s ease; }
.ppm__field:focus-within .ppm__field-icon, .ppm__field.has-value .ppm__field-icon { color: var(--ppm-gold); }
.ppm .ppm__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 6px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
}
.ppm .ppm__input::placeholder { color: #4d4f60; letter-spacing: .1em; }
.ppm__paste {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, .06);
  color: #a9abbd;
  font-size: 18px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ppm__paste:hover { background: rgba(245, 184, 46, .16); color: var(--ppm-gold); }

.ppm__error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  color: #ff8a8a;
  font-size: 12.5px;
  font-weight: 700;
  animation: ppmFade .2s ease;
}
.ppm__error i { font-size: 16px; }

.ppm__submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  margin-top: 14px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #8cf7c4, var(--ppm-accent) 45%, #2fc57f);
  box-shadow: 0 12px 26px -10px rgba(var(--ppm-accent-rgb), .8);
  color: #0d1a14;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.ppm__submit:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -10px rgba(var(--ppm-accent-rgb), .9); }
.ppm__submit:active { transform: translateY(1px); }
.ppm__submit-arrow { font-size: 20px; transition: transform .2s ease; }
.ppm__submit:hover .ppm__submit-arrow { transform: translateX(4px); }
.ppm__spinner {
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(13, 26, 20, .25);
  border-top-color: #0d1a14;
  animation: ppmSpin .7s linear infinite;
}
.ppm__submit.is-loading { cursor: default; filter: saturate(.8); }
.ppm__submit.is-loading .ppm__submit-text, .ppm__submit.is-loading .ppm__submit-arrow { display: none; }
.ppm__submit.is-loading .ppm__spinner { display: block; }

.ppm__view--success {
  --ppm-r: 79, 234, 159;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  animation: ppmFade .3s ease;
}
.ppm__view--money { --ppm-r: 245, 184, 46; }
.ppm__view--keys { --ppm-r: 168, 85, 247; }
.ppm__view--item { --ppm-r: 90, 180, 255; }
.ppm__reward-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 4px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(var(--ppm-r), .95), rgba(var(--ppm-r), .55));
  box-shadow: 0 16px 34px -12px rgba(var(--ppm-r), .9), inset 0 1px 0 rgba(255, 255, 255, .35);
  color: #111116;
  font-size: 38px;
  animation: ppmPop .55s cubic-bezier(.2, .9, .3, 1.4);
}
.ppm__reward-title { color: #fff; font-size: 20px; font-weight: 800; }
.ppm__reward-text { max-width: 330px; margin: 0 0 8px; color: rgba(236, 238, 245, .8); font-size: 14px; font-weight: 600; line-height: 1.5; }
.ppm__again {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--ppm-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .05);
  color: var(--ppm-text);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease;
}
.ppm__again:hover { background: rgba(255, 255, 255, .1); }

.ppm__confetti { position: absolute; top: 38px; left: 50%; width: 0; height: 0; pointer-events: none; }
.ppm__confetti i {
  --a: 0deg;
  --d: 110px;
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  background: rgb(var(--ppm-r));
  opacity: 0;
  animation: ppmBurst 1.1s cubic-bezier(.15, .7, .3, 1) forwards;
}
.ppm__confetti i:nth-child(3n) { background: #fff3c4; width: 6px; height: 6px; border-radius: 50%; }
.ppm__confetti i:nth-child(3n+1) { background: #ff7eb3; }
.ppm__confetti i:nth-child(1) { --a: 0deg; }
.ppm__confetti i:nth-child(2) { --a: 30deg; --d: 130px; }
.ppm__confetti i:nth-child(3) { --a: 60deg; }
.ppm__confetti i:nth-child(4) { --a: 90deg; --d: 140px; }
.ppm__confetti i:nth-child(5) { --a: 120deg; }
.ppm__confetti i:nth-child(6) { --a: 150deg; --d: 125px; }
.ppm__confetti i:nth-child(7) { --a: 180deg; }
.ppm__confetti i:nth-child(8) { --a: 210deg; --d: 135px; }
.ppm__confetti i:nth-child(9) { --a: 240deg; }
.ppm__confetti i:nth-child(10) { --a: 270deg; --d: 120px; }
.ppm__confetti i:nth-child(11) { --a: 300deg; }
.ppm__confetti i:nth-child(12) { --a: 330deg; --d: 140px; }
@keyframes ppmBurst {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(0) rotate(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) rotate(260deg); }
}

.ppm__history { margin: 0 24px 18px; padding-top: 16px; border-top: 1px solid var(--ppm-line); text-align: left; }
.ppm__history-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--ppm-muted); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.ppm__history-head i { font-size: 15px; }
.ppm__history-list { display: flex; flex-direction: column; gap: 6px; }
.ppm__hrow { --h: 79, 234, 159; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .03); }
.ppm__hrow--money { --h: 245, 184, 46; }
.ppm__hrow--keys { --h: 168, 85, 247; }
.ppm__hrow--item { --h: 90, 180, 255; }
.ppm__hicon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(var(--h), .15); color: rgb(var(--h)); font-size: 17px; }
.ppm__htext { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ppm__htext b { overflow: hidden; color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; text-overflow: ellipsis; }
.ppm__htext small { overflow: hidden; color: var(--ppm-muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.ppm__hdate { flex: 0 0 auto; color: #6e7084; font-size: 11px; font-weight: 700; }

.ppm__socials {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--ppm-line);
  background: rgba(0, 0, 0, .18);
  text-align: left;
}
.ppm__socials-label { color: var(--ppm-muted); font-size: 12px; font-weight: 600; }
.ppm__socials-links { display: flex; gap: 6px; flex: 0 0 auto; }
.ppm__social {
  --s: 255, 255, 255;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(var(--s), .12);
  color: rgb(var(--s));
  font-size: 19px;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.ppm__social:hover { transform: translateY(-2px); background: rgba(var(--s), .24); color: rgb(var(--s)); text-decoration: none; }
.ppm__social--discord { --s: 114, 137, 218; }
.ppm__social--telegram { --s: 42, 171, 238; }
.ppm__social--mail { --s: 245, 184, 46; }

.phd-balance.is-bump { animation: ppmBump .6s ease; }
@keyframes ppmBump { 40% { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(245, 184, 46, .25); } }

@media (max-width: 480px) {
  .ppm-overlay { align-items: flex-end; padding: 0; }
  .ppm { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; transform: translateY(40px); }
  .ppm__hero { height: 124px; }
  .ppm__gift { width: 80px; height: 80px; }
  .ppm__stage { padding: 0 18px 18px; }
  .ppm .ppm__input { font-size: 16px; }
  .ppm__history { margin: 0 18px 16px; }
  .ppm__socials { flex-direction: column; text-align: center; padding-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ppm, .ppm__rays, .ppm__gift, .ppm__spark, .ppm__confetti i, .ppm__reward-icon { animation: none !important; transition: none; }
}
