/* ═══════════════════════════════════════════════════════════════
   VIBRA EXPERIENCE — The UX Wrapper v1.0
   Onboarding · Transitions · Skeletons · Toasts · Micro-animations
   ═══════════════════════════════════════════════════════════════ */

/* ── ONBOARDING OVERLAY ── */
.vx-onboarding {
  position: fixed; inset: 0; z-index: 9999;
  background: #06040f;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 1; transition: opacity .5s ease;
  overflow: hidden;
}
.vx-onboarding.vx-exit {
  opacity: 0; pointer-events: none;
}
.vx-onboarding::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 80%, rgba(168,85,247,.12) 0%, transparent 70%);
}

.vx-slide-container {
  position: relative; width: 100%; max-width: 400px;
  height: 420px; overflow: hidden;
}
.vx-slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem;
  opacity: 0; transform: translateX(60px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}
.vx-slide.vx-active {
  opacity: 1; transform: translateX(0);
  pointer-events: auto;
}
.vx-slide.vx-prev {
  opacity: 0; transform: translateX(-60px);
}

.vx-slide-icon {
  font-size: 4.5rem; margin-bottom: 1.2rem;
  filter: drop-shadow(0 0 20px rgba(168,85,247,.4));
  animation: vxFloat 3s ease-in-out infinite;
}
@keyframes vxFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.vx-slide-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem; font-weight: 800;
  color: #fff; margin-bottom: .6rem;
  text-align: center;
}
.vx-slide-desc {
  font-family: 'DM Mono', monospace;
  font-size: .85rem; color: rgba(255,255,255,.6);
  text-align: center; line-height: 1.5;
  max-width: 300px;
}

/* Dots */
.vx-dots {
  display: flex; gap: 8px;
  margin-top: 2rem;
}
.vx-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  transition: all .3s ease;
}
.vx-dot.vx-active {
  background: #a855f7; width: 24px; border-radius: 4px;
}

/* CTA */
.vx-ob-btn {
  margin-top: 1.5rem;
  padding: .9rem 2.5rem;
  border-radius: 50px;
  border: none; cursor: pointer;
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #6d28d9);
  box-shadow: 0 4px 20px rgba(168,85,247,.4);
  transition: transform .15s ease, box-shadow .15s ease;
}
.vx-ob-btn:active {
  transform: scale(.95);
}
.vx-skip {
  margin-top: .8rem;
  background: none; border: none;
  color: rgba(255,255,255,.35);
  font-family: 'DM Mono', monospace;
  font-size: .75rem; cursor: pointer;
}

/* ── TAB TRANSITIONS ── */
.vx-tab-transition {
  animation: vxFadeUp .3s ease both;
}
@keyframes vxFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── SKELETON LOADING ── */
.vx-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 75%);
  background-size: 200% 100%;
  animation: vxShimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes vxShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.vx-skeleton-card {
  height: 120px; margin: 12px 16px;
  border-radius: 12px;
}
.vx-skeleton-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
}
.vx-skeleton-line {
  height: 14px; margin: 8px 16px;
  border-radius: 4px;
}
.vx-skeleton-line.short { width: 40%; }
.vx-skeleton-line.mid { width: 65%; }
.vx-skeleton-line.long { width: 90%; }

/* ── TOAST SYSTEM ── */
.vx-toast-container {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex; flex-direction: column-reverse;
  gap: 8px; align-items: center;
  pointer-events: none;
}
.vx-toast {
  padding: .7rem 1.4rem;
  border-radius: 50px;
  font-family: 'DM Mono', monospace;
  font-size: .8rem; color: #fff;
  background: rgba(15,10,30,.92);
  border: 1px solid rgba(168,85,247,.25);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  animation: vxToastIn .3s ease both;
  pointer-events: auto;
  white-space: nowrap;
}
.vx-toast.vx-toast-out {
  animation: vxToastOut .25s ease both;
}
@keyframes vxToastIn {
  from { opacity: 0; transform: translateY(20px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes vxToastOut {
  to { opacity: 0; transform: translateY(-10px) scale(.9); }
}
.vx-toast-success { border-color: rgba(34,197,94,.4); }
.vx-toast-error { border-color: rgba(239,68,68,.4); }
.vx-toast-vbc { border-color: rgba(250,204,21,.4); }

/* ── MICRO-ANIMATIONS ── */
@keyframes vxPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.vx-pulse { animation: vxPulse .35s ease; }

@keyframes vxConfetti {
  0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) rotate(720deg) scale(0); }
}
.vx-confetti-particle {
  position: fixed; width: 8px; height: 8px;
  border-radius: 2px; pointer-events: none;
  z-index: 10001;
  animation: vxConfetti .8s ease forwards;
}

/* ── PULL TO REFRESH ── */
.vx-ptr-indicator {
  position: fixed; top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50px);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(15,10,30,.9);
  border: 2px solid rgba(168,85,247,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 9990;
  transition: transform .2s ease;
  font-size: 1rem;
}
.vx-ptr-indicator.vx-pulling {
  transform: translateX(-50%) translateY(16px);
}
.vx-ptr-indicator.vx-refreshing {
  transform: translateX(-50%) translateY(16px);
  animation: vxSpin 1s linear infinite;
}
@keyframes vxSpin {
  to { transform: translateX(-50%) translateY(16px) rotate(360deg); }
}

/* ── EMPTY STATES ── */
.vx-empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 3rem 2rem; text-align: center;
}
.vx-empty-icon {
  font-size: 3rem; margin-bottom: 1rem;
  opacity: .4;
}
.vx-empty-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 1.1rem;
  color: rgba(255,255,255,.5);
  margin-bottom: .4rem;
}
.vx-empty-desc {
  font-family: 'DM Mono', monospace;
  font-size: .75rem; color: rgba(255,255,255,.3);
  line-height: 1.4;
}

/* ── NAV ACTIVE INDICATOR ── */
.vx-nav-indicator {
  position: absolute; bottom: 0; height: 3px;
  background: linear-gradient(90deg, #a855f7, #6d28d9);
  border-radius: 3px 3px 0 0;
  transition: left .3s ease, width .3s ease;
}

/* ── HAPTIC RIPPLE ── */
.vx-ripple {
  position: absolute; border-radius: 50%;
  background: rgba(168,85,247,.25);
  transform: scale(0);
  animation: vxRipple .5s ease forwards;
  pointer-events: none;
}
@keyframes vxRipple {
  to { transform: scale(4); opacity: 0; }
}

/* ── PAGE HEADER BLUR ── */
.vx-header-blur {
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px; z-index: 50;
  background: linear-gradient(to bottom, rgba(6,4,15,.95) 60%, transparent);
  backdrop-filter: blur(10px);
  pointer-events: none;
}
