/* Ferrofluid host + type FX */

.ferrofluid-host {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ferrofluid-host.ferrofluid-interactive {
  pointer-events: auto;
}

.ferrofluid-host canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.ferrofluid-static {
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, rgba(220, 38, 38, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(127, 29, 29, 0.28), transparent 50%),
    #03010a;
}

/* Type FX */
.h-type-fx-wrap {
  position: relative;
  display: block;
  margin-bottom: 14px;
}

.auth-input-group .h-type-fx-wrap {
  margin-bottom: 0;
  flex: 1;
  width: 100%;
}

.topup-amount-input-wrap .h-type-fx-wrap {
  margin-bottom: 0;
  flex: 1;
}

.h-type-fx-wrap .h-type-fx {
  margin-bottom: 0 !important;
  position: relative;
  z-index: 1;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.18s ease;
  letter-spacing: 0.02em;
}

.h-type-fx-wrap.is-focus .h-type-fx {
  border-color: rgba(248, 113, 113, 0.55) !important;
  box-shadow:
    0 0 0 3px rgba(194, 65, 65, 0.14),
    0 0 28px rgba(220, 38, 38, 0.12) !important;
}

.h-type-fx-wrap.is-typing .h-type-fx {
  transform: translateY(-1px) scale(1.008);
}

.h-type-fx-ink {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(248, 113, 113, 0.85), transparent);
  width: var(--fill, 0%);
  max-width: calc(100% - 24px);
  opacity: 0;
  transition: width 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
  z-index: 2;
}

.h-type-fx-wrap.is-focus .h-type-fx-ink,
.h-type-fx-wrap.is-filled .h-type-fx-ink {
  opacity: 1;
}

.h-type-fx-spark {
  position: absolute;
  top: 50%;
  left: var(--spark-x, 50%);
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #f87171;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 0 12px #ef4444;
}

.h-type-fx-wrap.is-typing .h-type-fx-spark {
  animation: hTypeSpark 0.28s ease-out forwards;
}

.h-type-fx-wrap.is-typing .h-type-fx-spark[data-kind="digit"] {
  background: #fda4af;
}

.h-type-fx-wrap.is-typing .h-type-fx-spark[data-kind="del"] {
  background: #94a3b8;
  box-shadow: 0 0 10px #64748b;
}

@keyframes hTypeSpark {
  0% { opacity: 0.95; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-14px) scale(0.2); }
}

@media (prefers-reduced-motion: reduce) {
  .h-type-fx-wrap.is-typing .h-type-fx { transform: none; }
  .h-type-fx-spark { display: none; }
}
