/* Base Reset for Universal AI Wave Loader */
#tb_ui_welcome {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #09090b; /* Zinc-950 (Universal dark premium space) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
  overflow: hidden;
}

/* Background Ambient Glow synced with the wave */
.tb-glow-bg {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(0,0,0,0) 60%);
  filter: blur(40px);
  animation: tb-bg-pulse 2s ease-in-out infinite alternate;
  z-index: 1;
}

/* Container for the fluid bars */
.tb-wave-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 80px;
  z-index: 10;
}

/* The individual animated fluid bars */
.tb-wave-bar {
  width: 8px;
  border-radius: 12px;
  background: #ffffff;
  animation: tb-wave-anim 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-origin: center;
}

/* Staggered heights, delays, and glowing premium colors */
.tb-wave-bar:nth-child(1) { 
  background: #3b82f6; 
  height: 24px; 
  animation-delay: -0.6s; 
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.8); 
}
.tb-wave-bar:nth-child(2) { 
  background: #6366f1; 
  height: 48px; 
  animation-delay: -0.45s; 
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.8); 
}
.tb-wave-bar:nth-child(3) { 
  background: #a855f7; 
  height: 72px; 
  animation-delay: -0.3s; 
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.8); 
}
.tb-wave-bar:nth-child(4) { 
  background: #d946ef; 
  height: 48px; 
  animation-delay: -0.15s; 
  box-shadow: 0 0 16px rgba(217, 70, 239, 0.8); 
}
.tb-wave-bar:nth-child(5) { 
  background: #ec4899; 
  height: 24px; 
  animation-delay: 0s; 
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.8); 
}

/* Dynamic Text below the wave */
.tb-wave-text {
  margin-top: 48px;
  /* Use strictly system fonts to avoid FOUT (Flash of Unstyled Text) when web fonts load */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc; /* Slate-50 */
  letter-spacing: 10px;
  text-transform: uppercase;
  z-index: 10;
  /* Prevent font-weight sub-pixel rendering glitches during opacity animation */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);
  will-change: opacity;
  animation: tb-text-pulse 2s ease-in-out infinite alternate;
  padding-left: 10px; /* Offset to perfectly center due to letter-spacing */
}

/* Animations */
@keyframes tb-wave-anim {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1.3); opacity: 1; }
}

@keyframes tb-bg-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 1; }
}

@keyframes tb-text-pulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Class added by JS to trigger fade out */
.tb-loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
