:root {
  --fondo: #000000;
  --carta: #0e0e10;
  --bordo: rgba(255, 255, 255, 0.09);
  --testo: #f4f4f5;
  --testo-2: #a1a1aa;
  --testo-3: #63636b;
  --pillola: #f4f4f5;
  --pillola-testo: #0b0b0c;
  --accento: #b9f06a;
  --accento-scuro: #10210a;
  --focus: #8b7bff;
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

/* the card: the recipient on top, the pill below, a good gap between them for the curve */
.pay {
  position: relative;
  width: min(340px, 100%);
  padding: clamp(16px, 4vh, 24px) 20px 20px;
  border-radius: 26px;
  background: linear-gradient(180deg, #121215 0%, var(--carta) 100%);
  box-shadow: inset 0 0 0 1px var(--bordo), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 9vh, 52px);
}

.to {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* GSAP owns the avatar's transform (the little jump); the face inside is for the CSS */
.avatar {
  position: relative;
  flex: none;
  width: 56px;
  height: 56px;
}
.ring {
  position: absolute;
  inset: -4px;
  width: 64px;
  height: 64px;
  transform: rotate(-90deg);
  overflow: visible;
  fill: none;
}
.ring__track { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1.5; }
.ring__line { stroke: var(--accento); stroke-width: 2; stroke-linecap: round; }
.avatar__face {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, #3a3a42 0%, #1d1d22 60%, #141418 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 -6px 12px rgba(0, 0, 0, 0.35);
}
.avatar__shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 40% at 35% 15%, rgba(255, 255, 255, 0.18), transparent 70%);
}
.avatar__initials {
  position: relative;
  font-size: 17px;
  font-weight: 620;
  font-stretch: 108%;
  letter-spacing: 0.02em;
  color: #e7e7ea;
}

.to__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.to__name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
/* one line at a time: the old note leaves, then the new one comes in */
.to__note {
  position: relative;
  display: block;
  height: 19px;
  overflow: hidden;
  font-size: 14px;
  line-height: 19px;
  color: var(--testo-2);
  white-space: nowrap;
}
.note { display: block; }
.note b { font-weight: 560; color: var(--accento); }

/* the pill: GSAP owns its transform (scale, y); the fill and the inner row are children */
.send {
  position: relative;
  align-self: stretch;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: var(--pillola);
  color: var(--pillola-testo);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 26px -12px rgba(255, 255, 255, 0.18);
  transition: box-shadow 0.25s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.send:focus { outline: none; }
.send:focus-visible { box-shadow: 0 0 0 3px #000000, 0 0 0 5px var(--focus); }
@media (hover: hover) {
  .send:hover { box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 14px 30px -12px rgba(255, 255, 255, 0.26); }
}

/* the accent fills the pill from its middle when the money has arrived */
.send__fill {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: var(--accento);
  transform: scale(0);
  z-index: -1;
  pointer-events: none;
}

.send__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.tick {
  flex: none;
  width: 0;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.send__label,
.send__amount {
  position: relative;
  display: block;
  height: 22px;
  overflow: hidden;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  font-stretch: 104%;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.send__amount { padding-left: 6px; font-variant-numeric: lining-nums; }
.lab, .amount { display: block; }

/* the amount that flies: a small pill of its own, in the accent */
.chip {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0 10px;
  height: 30px;
  line-height: 30px;
  border-radius: 999px;
  background: var(--accento);
  color: var(--accento-scuro);
  font-size: 15px;
  font-weight: 650;
  font-stretch: 104%;
  white-space: nowrap;
  box-shadow: 0 8px 18px -8px rgba(185, 240, 106, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  visibility: hidden;
  pointer-events: none;
  z-index: 3;
  will-change: transform;
}

.path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.path path {
  fill: none;
  stroke: var(--accento);
  stroke-width: 1.2;
  stroke-linecap: butt;
  opacity: 0;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  fill: #f4f4f5;
  stroke: #000000;
  stroke-width: 1.3;
  stroke-linejoin: round;
  pointer-events: none;
  visibility: hidden;
  z-index: 4;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

@media (max-height: 380px) {
  .pay { gap: 22px; padding-top: 14px; }
}
