/* ===== Donate page ===== */

/* ---------- upkeep panel ---------- */
.upkeep {
  width: min(820px, 100%);
  display: flex; align-items: center; gap: clamp(14px, 4vw, 40px);
}
.upkeep-info { flex: 1; min-width: 0; }

.price {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin: 10px 0 4px;
  line-height: 1;
}
.price .cur, .price .amount {
  font-size: clamp(56px, 10vw, 96px);
  color: #ffc93a;
  -webkit-text-stroke: 3px var(--brown-dark);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--brown-dark);
}
.price .amount { display: inline-block; min-width: 1.2ch; }
.price .amount.land { animation: land .6s var(--spring); }
@keyframes land {
  0% { transform: scale(1); } 35% { transform: scale(1.25, .8); } 65% { transform: scale(.92, 1.08); } 100% { transform: scale(1); }
}
.price .per {
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: clamp(14px, 2.4vw, 20px);
  color: var(--brown);
}

.upkeep-line { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; }
.upkeep .price { margin: 0; }
.price .per { margin-left: 4px; }

/* rainbow wavy headline */
.rainbow {
  display: block;
  line-height: 1.05;
  -webkit-text-stroke: 3px var(--brown-dark);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--brown-dark);
  color: #ff5a7a;
}
.rainbow.r1 { font-size: clamp(26px, 4.4vw, 40px); }
.rainbow.r2 { font-size: clamp(30px, 4.4vw, 48px); white-space: nowrap; }
@media (max-width: 420px) { .rainbow.r2 { white-space: normal; } }
.rainbow .ch {
  display: inline-block;
  animation: rainbow 2.4s linear infinite, rbHop 2.2s var(--soft) infinite;
  animation-delay: calc(var(--i) * -0.12s), calc(var(--i) * 0.06s);
}
.rainbow .sp { display: inline-block; width: .3em; }
.rainbow.r2 .ch { animation-delay: calc(var(--i) * -0.12s - 1.2s), calc(var(--i) * 0.06s + .5s); }
@keyframes rainbow {
  0%     { color: #ff5a7a; }
  16.6%  { color: #ff9a2e; }
  33.3%  { color: #ffd23f; }
  50%    { color: #7cdc5a; }
  66.6%  { color: #5ab8ff; }
  83.3%  { color: #b46ee0; }
  100%   { color: #ff5a7a; }
}
@keyframes rbHop {
  0%, 25%, 100% { transform: translateY(0) rotate(0); }
  12%           { transform: translateY(-6px) rotate(-5deg); }
}
.r2 { filter: drop-shadow(0 0 14px rgba(255, 255, 255, .8)); }

/* coin tower */
.coin-stack {
  position: relative;
  width: clamp(90px, 16vw, 150px);
  height: clamp(140px, 22vw, 200px);
  flex: none;
}
.coin-stack .c {
  position: absolute; left: 50%;
  width: 78%; height: 18%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffe066 0 45%, #e8a317 45% 100%);
  border: 4px solid var(--brown-dark);
  border-radius: 50% / 45%;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.6);
  animation: coinDrop .7s var(--spring) both;
}
@keyframes coinDrop {
  from { opacity: 0; transform: translate(-50%, -260px) rotate(-30deg); }
  to   { opacity: 1; transform: translate(-50%, 0) rotate(var(--tilt, 0deg)); }
}
.coin-stack .big {
  position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
  animation: bigIn .8s var(--spring) both 1.3s;
}
.coin-stack .big .spin { display: block; animation: coinSpin 2.4s linear infinite 2.1s; }
.coin-stack .big svg { display: block; filter: drop-shadow(0 5px 0 rgba(59,32,9,.35)); }
@keyframes bigIn { from { opacity: 0; transform: translate(-50%, -80px) scale(.3); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes coinSpin {
  0%   { transform: translateY(0) scaleX(1); }
  25%  { transform: translateY(-8px) scaleX(.1); }
  50%  { transform: translateY(-12px) scaleX(-1); }
  75%  { transform: translateY(-8px) scaleX(-.1); }
  100% { transform: translateY(0) scaleX(1); }
}

@media (max-width: 560px) {
  .upkeep { flex-direction: column; text-align: center; }
  .price { justify-content: center; }
  .upkeep-info { width: 100%; }
  .upkeep-line { align-items: center; }
}

/* ---------- Discord contact card ---------- */
.contact { width: min(760px, 100%); perspective: 1000px; animation: enter .9s var(--out) both .8s; }

.contact-card {
  --rx: 0deg; --ry: 0deg;
  position: relative;
  display: flex; align-items: center; gap: clamp(14px, 4vw, 36px);
  padding: clamp(18px, 3.5vw, 30px);
  border: 4px solid var(--brown-dark);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.25), transparent 40%),
    repeating-conic-gradient(rgba(255,255,255,.07) 0 25%, transparent 0 50%) 0 0 / 28px 28px,
    linear-gradient(135deg, #7b87ff 0%, #5865f2 45%, #8a48d8 100%);
  background-size: auto, 28px 28px, 200% 200%;
  box-shadow:
    inset 0 5px 0 rgba(255,255,255,.3), inset 0 -8px 0 rgba(0,0,0,.18),
    0 10px 0 #3c2fa8, 0 10px 0 4px var(--brown-dark),
    0 26px 40px rgba(88, 101, 242, .35);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--spring);
  animation: gradShift 8s ease-in-out infinite;
  overflow: hidden;
  isolation: isolate;
}
@keyframes gradShift {
  0%, 100% { background-position: 0 0, 0 0, 0% 50%; }
  50%      { background-position: 0 0, 28px 28px, 100% 50%; }
}

/* sweeping shine */
.contact-shine { position: absolute; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; border-radius: 24px; }
.contact-shine::before {
  content: ""; position: absolute; top: -30%; bottom: -30%; width: 30%; left: -50%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg);
  animation: shine 4.5s var(--soft) infinite 1.8s;
}

/* twinkling pixel sparkles */
.spark {
  position: absolute; width: 8px; height: 8px; background: #fff; z-index: -1;
  box-shadow: 8px 0 0 #fff, -8px 0 0 #fff, 0 8px 0 #fff, 0 -8px 0 #fff;
  opacity: 0; transform: scale(.5);
  animation: twinkle 2.6s var(--soft) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(.3) rotate(0); }
  50%      { opacity: .85; transform: scale(.6) rotate(45deg); }
}

.contact-card { justify-content: center; text-align: center; }
.contact-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contact-body .pixel-label { background: rgba(30, 20, 90, .55); color: #fff; }

.contact-title {
  font-weight: 400;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 3px var(--brown-dark);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--brown-dark);
}
.contact-title .ch { display: inline-block; animation: hop 3.4s var(--soft) infinite; animation-delay: calc(1.6s + var(--i) * 60ms); }
.contact-title .sp { display: inline-block; width: .3em; }

/* the username button */
.user-btn {
  --lift: 0px;
  position: relative;
  display: inline-flex; align-items: center; gap: 4px;
  max-width: 100%;
  font: inherit; cursor: pointer;
  font-size: clamp(26px, 4.6vw, 42px); line-height: 1;
  color: var(--brown-dark);
  background: linear-gradient(180deg, #fffdf2, var(--gold-1));
  border: 4px solid var(--brown-dark); border-radius: 18px;
  padding: 10px 12px 12px 16px;
  box-shadow: inset 0 -5px 0 var(--gold-2), inset 0 4px 0 #fff, 0 7px 0 var(--gold-4), 0 7px 0 4px var(--brown-dark);
  transform: translateY(var(--lift));
  transition: transform .4s var(--spring), box-shadow .15s ease;
  animation: userGlow 2.4s var(--soft) infinite;
}
@keyframes userGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 230, 120, 0)); }
  50%      { filter: drop-shadow(0 0 14px rgba(255, 230, 120, .9)); }
}
.user-btn:hover { --lift: -4px; transform: translateY(var(--lift)) rotate(-1.5deg) scale(1.03); }
.user-btn:active { --lift: 5px; transform: translateY(var(--lift)); box-shadow: inset 0 -5px 0 var(--gold-2), inset 0 4px 0 #fff, 0 2px 0 var(--gold-4), 0 2px 0 4px var(--brown-dark); transition-duration: .07s; }
.user-btn:focus-visible { outline: 4px dashed #fff; outline-offset: 6px; }
.user-btn .at { color: #5865f2; }
.user-btn .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-chip {
  margin-left: 10px; flex: none;
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 13px; letter-spacing: 1px;
  color: #fff; background: #5865f2;
  border: 3px solid var(--brown-dark); border-radius: 10px;
  padding: 5px 9px 6px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.35);
  transition: transform .35s var(--spring), background .2s ease;
}
.user-btn:hover .copy-chip { transform: scale(1.1) rotate(4deg); }
.user-btn.copied .copy-chip { background: var(--leaf-dark); }
.user-btn.copied { animation: squish .55s var(--spring); }

.contact-hint {
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 13px; line-height: 1.5;
  color: #eef0ff;
}

.open-discord {
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 14px; letter-spacing: 1px;
  color: var(--brown-dark); text-decoration: none;
  background: var(--gold-2); border: 3px solid var(--brown-dark); border-radius: 12px;
  padding: 7px 14px 8px; box-shadow: 0 4px 0 var(--brown-dark);
  transition: transform .35s var(--spring);
}
.open-discord:hover { transform: translateY(-2px) scale(1.06); }

@media (max-width: 640px) {
  .contact-card { flex-direction: column; text-align: center; }
}
