/* Base layout */
html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% -10%, #272a36 0%, #0f1220 60%, #0b0d18 100%);
  color: #f5f7fb;
  overflow: hidden; /* keep scrollbars off while coins fall */
}

.page {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
}

.title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Basket UI */
.basket {
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.basket__icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  font-size: 40px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.basket__count {
  min-width: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2a3042 0%, #1b2031 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-weight: 700;
  color: #f8fafc;
}

.basket.bump .basket__icon {
  animation: basket-bump 300ms ease;
}

@keyframes basket-bump {
  0% { transform: translateY(-50%) scale(1); }
  30% { transform: translateY(-50%) scale(1.08); }
  100% { transform: translateY(-50%) scale(1); }
}

/* Coin visuals */
.coin {
  position: fixed;
  top: -80px; /* start slightly above viewport */
  width: 40px;
  height: 40px;
  pointer-events: auto; /* allow clicking to collect */
  background-repeat: no-repeat;
  background-size: cover;
  will-change: transform, opacity;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
  animation-name: fall, spin;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: 1, infinite;
}

/* Keyframes */
@keyframes fall {
  0% { transform: translate3d(var(--x, 0px), -120px, 0) rotate(var(--r0, 0deg)); opacity: 0; }
  5% { opacity: 1; }
  100% { transform: translate3d(var(--x, 0px), 110vh, 0) rotate(var(--r1, 360deg)); opacity: 1; }
}

@keyframes spin {
  0% { filter: drop-shadow(0 6px 8px rgba(0,0,0,0.35)); }
  50% { filter: drop-shadow(0 10px 12px rgba(0,0,0,0.45)); }
  100% { filter: drop-shadow(0 6px 8px rgba(0,0,0,0.35)); }
}

/* Motion sensitivity */
@media (prefers-reduced-motion: reduce) {
  .coin { animation: fall 10s linear 1; }
}


