/**
 * Intro Animation Styles
 * Version: 1.0.0
 *
 * Fireworks Intro Animation for homeorganizer Landing Page
 */

/* =====================================================
   OVERLAY CONTAINER
   ===================================================== */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.intro-overlay.hidden {
  display: none !important;
}

/* =====================================================
   INTRO BRANDING (Logo + Tagline)
   ===================================================== */
.intro-branding {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.intro-logo {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.intro-tagline {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  user-select: none;
}

/* =====================================================
   CANVAS
   ===================================================== */
#fireworks-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* =====================================================
   COUNTDOWN
   ===================================================== */
#countdown-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#countdown-number {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: min(20vw, 200px);
  font-weight: 700;
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  user-select: none;
}

#countdown-number.visible {
  animation: countdownPulse 0.9s ease-out forwards;
}

/* =====================================================
   INTRO TEXT
   ===================================================== */
#intro-text {
  position: absolute;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: min(6vw, 48px);
  font-weight: 600;
  color: #fff;
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 255, 255, 0.3);
  opacity: 0;
  transform: scale(0.9);
  z-index: 1;
  text-align: center;
  padding: 0 20px;
  user-select: none;
}

#intro-text.visible {
  animation: fadeInScale 0.5s ease-out forwards;
}

/* =====================================================
   SKIP BUTTON
   ===================================================== */
.skip-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 14px;
  z-index: 10000;
  transition: opacity 0.2s, background-color 0.2s;
  user-select: none;
}

.skip-btn:hover {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.1);
}

.skip-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.skip-btn:active {
  transform: scale(0.98);
}

/* =====================================================
   KEYFRAME ANIMATIONS
   ===================================================== */
@keyframes countdownPulse {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.15);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =====================================================
   ACCESSIBILITY: REDUCED MOTION
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  .intro-overlay {
    display: none !important;
  }
}

/* =====================================================
   RESPONSIVE: MOBILE
   ===================================================== */
@media (max-width: 768px) {
  .intro-branding {
    top: 40px;
    gap: 8px;
  }

  .intro-logo {
    height: 36px;
  }

  .intro-tagline {
    font-size: 13px;
    padding: 0 20px;
    text-align: center;
  }

  #countdown-number {
    font-size: min(30vw, 150px);
  }

  #intro-text {
    font-size: min(8vw, 32px);
  }

  .skip-btn {
    bottom: 15px;
    right: 15px;
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* =====================================================
   RESPONSIVE: TABLET
   ===================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  #countdown-number {
    font-size: min(25vw, 180px);
  }

  #intro-text {
    font-size: min(5vw, 40px);
  }
}
