/* ==========================================================================
   ZERO UI EXTRA — COMPONENT ENHANCEMENTS & UTILITIES
   Micro-Tactile Click Feedback, GPU Scroll Progress, Zero Lag
   ========================================================================== */

/* Strict Button Containment for Click Ripple */
.btn-primary,
.btn-ghost,
.btn-danger,
.cx-btn,
.login-btn,
.type-btn,
.nav-item,
.copy-btn,
.telegram-link-btn,
.modal-btn,
button.btn {
  position: relative !important;
  overflow: hidden !important;
  -webkit-tap-highlight-color: transparent;
}

/* GPU-Accelerated Top Scroll Progress Bar (scaleX - Zero Reflow) */
.z-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #ffffff 0%, #a1a1aa 100%);
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
  z-index: 1000;
  pointer-events: none;
}

/* Scroll Back to Top Button */
.z-backtop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(18, 18, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f4f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, border-color 0.15s ease;
  z-index: 900;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.z-backtop.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.z-backtop:hover {
  background: #27272a;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
}

.z-backtop:active {
  transform: translateY(1px) scale(0.96);
}

/* Ultra-Slick Micro-Ripple (Strictly Clipped, Minimal, Elegant) */
.z-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 70%);
  transform: translate(-50%, -50%) scale(0.3);
  animation: zRippleAnim 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  z-index: 1;
}

/* Invert ripple on white/bright buttons for high contrast */
.btn-primary .z-ripple,
.login-btn .z-ripple,
.nav-item.active .z-ripple,
.type-btn.active .z-ripple,
.cx-btn-fullcontrol .z-ripple {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 70%);
}

@keyframes zRippleAnim {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0.85;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0;
  }
}

/* Subtle Active Button Tap Feel */
.btn-primary:active,
.btn-ghost:active,
.btn-danger:active,
.cx-btn:active,
.login-btn:active,
.type-btn:active {
  transform: scale(0.985);
  transition: transform 0.08s ease;
}

/* Prebuild Wait Spinner */
.prebuild-wait {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px;
  text-align: center;
}

.soon-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  animation: spinSlow 10s linear infinite;
  will-change: transform;
}

.soon-core {
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  font-size: 15px;
  color: #ffffff;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.prebuild-hint {
  font-size: 11px;
  color: var(--text-muted, #71717a);
  margin-top: 8px;
}
