/* Intro Overlay Styles */

#introOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
}

#introOverlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#introFlashContent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.05s ease-in-out;
  filter: grayscale(0.5) contrast(1.2) brightness(0.8) blur(1px); /* Subtle blur hides low-res noise */
  pointer-events: none; /* Ensure it doesn't block clicks */
}

#introOverlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 40%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
  pointer-events: none;
}

#introStat {
  position: absolute;
  bottom: 10%;
  left: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-family: 'Bebas Neue', cursive;
  font-size: 6rem;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(0, 119, 192, 0.8), 4px 4px 0 #000;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: all 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  padding: 0 2rem;
}

.flash-active #introStat {
  opacity: 1;
  transform: translateY(0) scale(1.1);
}

.flash-active #introFlashContent {
  opacity: 1;
}

#introOverlay h2 {
    color: #fff;
    font-family: 'Bebas Neue', cursive;
    font-size: 5rem;
    margin-bottom: 2rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    z-index: 10;
    pointer-events: none;
}

#introButtons {
    z-index: 20;
    position: relative;
}

#startIntroBtn {
  padding: 1.5rem 3rem;
  background-color: var(--magic-blue, #0077C0);
  color: #fff;
  border: none;
  font-family: 'Bebas Neue', cursive;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  z-index: 1;
  box-shadow: 0 0 30px rgba(0, 119, 192, 0.5);
  transition: all 0.3s ease;
}

#startIntroBtn:hover {
  transform: scale(1.1);
  background-color: #005A91;
  box-shadow: 0 0 50px rgba(0, 119, 192, 0.8);
}

/* Slam dunk impact effect */
@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.slam-dunk-impact {
  animation: shake 0.5s;
}
