
#preloader {
  position: fixed;
  inset: 0;
  background: rgba(2, 1, 7, 0.4); /* Reduced opacity for better transparency */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  background-image: 
    radial-gradient(circle at 20px 30px, rgba(255, 255, 255, 0.5), transparent 2px),
    radial-gradient(circle at 100px 80px, rgba(255, 255, 255, 0.3), transparent 1px),
    radial-gradient(circle at 50px 150px, rgba(255, 255, 255, 0.4), transparent 2px),
    radial-gradient(circle at 180px 40px, rgba(255, 255, 255, 0.6), transparent 1.5px),
    radial-gradient(circle at 120px 200px, rgba(255, 255, 255, 0.4), transparent 2.5px);
  background-size: 250px 250px;
}

#preloader.fade-out { 
  opacity: 0; 
  pointer-events: none; 
}

.space-jam {
  position: relative;
  margin: 0;
  width: 720px;
  height: 471px;
  display: none;
  font-family: 'Luckiest Guy', cursive;
  font-weight: normal;
  line-height: 1;
  text-transform: uppercase;
  animation: introAnim 1s forwards reverse;
  will-change: transform, opacity;
  cursor: pointer;
}

.space-jam span {
  position: absolute;
  display: inline-block;
  text-shadow: 0 4px 15px rgba(0,0,0,0.5); /* Enhanced shadow for visibility on transparent bg */
  transform: translateY(0);
  animation: letterAnim 0.9s forwards ease-in-out;
  will-change: transform;
}

.space-jam span:after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  text-shadow: none;
  background: radial-gradient(circle at center, #cede73 0%,#a5cd63 21%,#3ab473 36%,#036ba5 54%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke-color: white;
  -webkit-text-stroke-width: 4px;
}

/* Delay for letters - Adjusted for immediate start */
.s-u { animation-delay: 0.05s; }
.s-t { animation-delay: 0.1s; }
.s-i { animation-delay: 0.15s; }
.s-l-char { animation-delay: 0.2s; }
.s-i2 { animation-delay: 0.25s; }
.s-t2 { animation-delay: 0.3s; }
.s-y { animation-delay: 0.35s; }

.j-c { animation-delay: 0.4s; }
.j-u { animation-delay: 0.45s; }
.j-r { animation-delay: 0.5s; }
.j-a { animation-delay: 0.55s; }
.j-t { animation-delay: 0.6s; }
.j-o { animation-delay: 0.65s; }
.j-r2 { animation-delay: 0.7s; }

/* Background Letter U */
.j-j {
  top: -25px;
  left: 228px;
  font-size: 500px;
  font-family: 'Paytone One', sans-serif;
  display: inline-block;
  animation-delay: 0.4s !important;
  opacity: 0.8; /* Slight transparency for background letter */
}

.j-j:after {
  background-position: -20px 25px;
}

.j-j:not(:first-child):not(:last-child) {
  clip: rect(388px, 500px, 453px, -10px);
}

.j-j:last-child {
  clip: rect(0px, 500px, 224px, 0px);
}

/* UTILITY Letters */
.s-l { font-size: 110px; top: 125px; z-index: 4; }
.s-u { left: 0px; }
.s-t { left: 55px; }
.s-i { left: 95px; }
.s-l-char { left: 120px; }
.s-i2 { left: 145px; }
.s-t2 { left: 175px; }
.s-y { left: 220px; }

/* CURATOR Letters */
.j-l { font-size: 150px; top: 70px; z-index: 3; }
.j-c { left: 340px; }
.j-u { left: 400px; }
.j-r { left: 460px; }
.j-a { left: 520px; }
.j-t { left: 580px; }
.j-o { left: 630px; }
.j-r2 { left: 690px; }

/* Rings */
.rings {
  position: absolute;
  top: -10px;
  left: 187px;
  width: 400px;
  height: 400px;
  transform: rotate(8deg) skewX(-33deg);
}

.rings [class^=ring-] {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.rings [class^=ring-]:after {
  content: '';
  display: block;
  position: absolute;
  border-radius: 50%;
}

.ring-1 { width: 400px; height: 400px; }
.ring-1:after { width: 400px; height: 400px; background: radial-gradient(circle closest-side, transparent 85%, #f6eb16 85%, #ed2224 88%, #35469d 100%); }

.ring-2 { width: 340px; height: 340px; }
.ring-2:after { width: 340px; height: 340px; background: radial-gradient(circle closest-side, transparent 82%, #f6eb16 82%, #ed2224 88%, #35469d 100%); }

.ring-3 { width: 280px; height: 280px; }
.ring-3:after { width: 280px; height: 280px; background: radial-gradient(circle closest-side, transparent 78%, #f6eb16 78%, #ed2224 88%, #35469d 100%); }

.ring-4 { width: 220px; height: 220px; }
.ring-4:after { width: 220px; height: 220px; background: radial-gradient(circle closest-side, transparent 73%, #f6eb16 73%, #ed2224 88%, #35469d 100%); }

@keyframes introAnim {
  100% {
    opacity: 0;
    transform: scale(3);
  }
}

@keyframes letterAnim {
  0% { transform: translateY(0px); }
  25% { transform: translateY(-10px); }
  60% { transform: translateY(20px); }
  100% { transform: translateY(0px); }
}

@media (max-width: 768px) {
  .space-jam {
    width: 720px; /* Must keep original width for absolute positioning */
    height: 471px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5) !important;
    display: block;
    margin: 0;
  }
  .j-j {
    font-size: 500px !important;
    left: 228px !important;
    transform: none !important;
    top: -25px !important;
  }
  .rings {
    left: 187px !important;
    transform: rotate(8deg) skewX(-33deg) !important;
    width: 400px;
    height: 400px;
    top: -10px;
  }
  /* Reset everything back to desktop values since we are scaling the container */
  .ring-1 { width: 400px; height: 400px; }
  .ring-1:after { width: 400px; height: 400px; }
  .ring-2 { width: 340px; height: 340px; }
  .ring-2:after { width: 340px; height: 340px; }
  .ring-3 { width: 280px; height: 280px; }
  .ring-3:after { width: 280px; height: 280px; }
  .ring-4 { width: 220px; height: 220px; }
  .ring-4:after { width: 220px; height: 220px; }

  .s-l { font-size: 110px !important; top: 125px !important; }
  .s-u { left: 0px; }
  .s-t { left: 55px; }
  .s-i { left: 95px; }
  .s-l-char { left: 120px; }
  .s-i2 { left: 145px; }
  .s-t2 { left: 175px; }
  .s-y { left: 220px; }

  .j-l { font-size: 150px !important; top: 70px !important; }
  .j-c { left: 340px; display: block; }
  .j-u { left: 400px; }
  .j-r { left: 460px; }
  .j-a { left: 520px; }
  .j-t { left: 580px; display: block; }
  .j-o { left: 630px; display: block; }
  .j-r2 { left: 690px; display: block; }
}

@media (max-width: 480px) {
  .space-jam {
    transform: translate(-50%, -50%) scale(0.42) !important;
  }
}


