/**
 * Tap-button juice: floating reward numbers, an impact shockwave ring, a
 * combo badge for rapid consecutive taps, and a big "hype" phrase that pops
 * up once a tap streak crosses a milestone. All elements are created and
 * positioned by tap-effects.js; this file only owns their look and motion.
 *
 * Not @layer-wrapped, same reasoning as design-system.css: this only reaches
 * elements tap-effects.js injects itself, but staying unlayered keeps one
 * consistent rule across every add-on sheet in this project.
 */

/**
 * Motion for the pooled elements below is driven by tap-effects.js through
 * element.animate() rather than CSS animations. A CSS animation can only be
 * restarted on a re-used node by toggling a class and forcing a reflow, and
 * that forced reflow in the tap path was a measurable share of the per-tap
 * cost. These rules own the look; the script owns the movement.
 */

.vt-tap-number {
  position: fixed;
  z-index: 10000;
  opacity: 0;
  color: var(--brand-400, #d9ff57);
  font-family: "Unbounded", ui-sans-serif, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 0 18px rgba(var(--brand-rgb, 217, 255, 87), 0.65), 0 2px 10px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.vt-tap-number.tier-2 {
  color: #f2ffb0;
  text-shadow: 0 0 22px rgba(var(--brand-rgb, 217, 255, 87), 0.85), 0 2px 10px rgba(0, 0, 0, 0.55);
}

.vt-tap-number.tier-3 {
  color: #57ffd0;
  text-shadow: 0 0 26px rgba(87, 255, 208, 0.8), 0 2px 10px rgba(0, 0, 0, 0.55);
}

.vt-shockwave {
  position: fixed;
  z-index: 9997;
  width: 12px;
  height: 12px;
  opacity: 0;
  border-radius: 50%;
  border: 2px solid rgba(var(--brand-rgb, 217, 255, 87), 0.55);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
}

.vt-combo-badge {
  position: fixed;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-rgb, 217, 255, 87), 0.4);
  background: linear-gradient(145deg, rgba(28, 40, 14, 0.92), rgba(10, 16, 8, 0.92));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 20px rgba(var(--brand-rgb, 217, 255, 87), 0.18);
  color: var(--brand-400, #d9ff57);
  font-family: "Unbounded", ui-sans-serif, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.vt-combo-badge::before {
  content: "\26A1";
  font-size: 11px;
}

.vt-combo-badge.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.vt-hype-layer {
  position: fixed;
  z-index: 10002;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.vt-hype-message {
  padding: 10px 26px;
  border-radius: 16px;
  border: 1px solid rgba(var(--brand-rgb, 217, 255, 87), 0.45);
  background: linear-gradient(160deg, rgba(30, 42, 15, 0.92), rgba(8, 13, 7, 0.94));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 60px rgba(var(--brand-rgb, 217, 255, 87), 0.22);
  color: #f4ffd8;
  font-family: "Unbounded", ui-sans-serif, sans-serif;
  font-size: clamp(20px, 6.5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  text-shadow: 0 0 24px rgba(var(--brand-rgb, 217, 255, 87), 0.5);
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.6) rotate(-3deg);
  grid-area: 1 / 1;
}

.vt-hype-message.tier-epic {
  color: #eafff5;
  border-color: rgba(87, 255, 208, 0.5);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 70px rgba(87, 255, 208, 0.3);
  text-shadow: 0 0 26px rgba(87, 255, 208, 0.55);
}

/* prefers-reduced-motion is honoured in tap-effects.js, which skips the
   animations outright rather than running them at a near-zero duration. */
@media (prefers-reduced-motion: reduce) {
  .vt-combo-badge {
    transition-duration: 0.01ms;
  }
}
