/* Wedding Loading Screen Styles */
.wedding-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #1a1a1a 0%,
    #2d1f2d 25%,
    #4a1a3d 50%,
    #2d1f2d 75%,
    #1a1a1a 100%
  );
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: all 0.8s ease-in-out;
  overflow: hidden;
}

.wedding-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.wedding-loader::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      circle at 20% 20%,
      rgba(255, 183, 213, 0.1) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(255, 158, 195, 0.08) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 40% 60%,
      rgba(211, 93, 148, 0.06) 1px,
      transparent 1px
    );
  background-size: 50px 50px, 80px 80px, 30px 30px;
  animation: floating-bg 20s linear infinite;
  pointer-events: none;
}

@keyframes floating-bg {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(10px, -10px);
  }
  66% {
    transform: translate(-5px, -15px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.loader-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Wedding Rings Animation */
.wedding-rings {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
}

.ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 4px solid;
  border-radius: 50%;
  animation: ring-rotate 3s linear infinite;
}

.ring-1 {
  border-color: #ff9ec3 transparent #ff9ec3 transparent;
  top: 0;
  left: 0;
}

.ring-2 {
  border-color: transparent #d35d94 transparent #d35d94;
  top: 20px;
  left: 20px;
  animation-delay: -1.5s;
  animation-direction: reverse;
}

.ring-diamond {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #fff, #ff9ec3);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 158, 195, 0.8),
    0 0 20px rgba(255, 158, 195, 0.5);
  animation: diamond-sparkle 2s ease-in-out infinite;
}

@keyframes ring-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes diamond-sparkle {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 10px rgba(255, 158, 195, 0.8),
      0 0 20px rgba(255, 158, 195, 0.5);
  }
  50% {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 15px rgba(255, 158, 195, 1),
      0 0 30px rgba(255, 158, 195, 0.7), 0 0 40px rgba(255, 183, 213, 0.4);
  }
}

/* Floating Hearts */
.loader-hearts {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-heart {
  position: absolute;
  color: #ff9ec3;
  font-size: 1.5rem;
  opacity: 0;
  animation: float-heart 4s ease-in-out infinite;
}

.heart-1 {
  top: 20%;
  left: 15%;
  animation-delay: 0s;
}
.heart-2 {
  top: 60%;
  left: 85%;
  animation-delay: 0.8s;
}
.heart-3 {
  top: 80%;
  left: 20%;
  animation-delay: 1.6s;
}
.heart-4 {
  top: 30%;
  left: 80%;
  animation-delay: 2.4s;
}
.heart-5 {
  top: 70%;
  left: 50%;
  animation-delay: 3.2s;
}

@keyframes float-heart {
  0%,
  100% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  20%,
  80% {
    opacity: 0.6;
    transform: translateY(-20px) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-30px) scale(1.2);
  }
}

/* Loader Text */
.loader-title {
  font-family: "Bellina", serif;
  font-size: 3rem;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(255, 183, 213, 0.8),
    0 0 40px rgba(255, 158, 195, 0.4);
  animation: title-glow 3s ease-in-out infinite alternate;
}

.loader-subtitle {
  font-family: "Bricolage", sans-serif;
  font-size: 1.2rem;
  color: #ff9ec3;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: subtitle-fade 2s ease-in-out infinite alternate;
}

@keyframes title-glow {
  0% {
    text-shadow: 0 0 20px rgba(255, 183, 213, 0.8),
      0 0 40px rgba(255, 158, 195, 0.4);
  }
  100% {
    text-shadow: 0 0 30px rgba(255, 183, 213, 1),
      0 0 60px rgba(255, 158, 195, 0.6), 0 0 80px rgba(211, 93, 148, 0.3);
  }
}

@keyframes subtitle-fade {
  0% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

/* Progress Bar */
.wedding-progress {
  width: 300px;
  margin: 0 auto;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    #d35d94,
    #ff9ec3,
    #ffb7d5,
    #ff9ec3,
    #d35d94
  );
  background-size: 200% 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
  animation: progress-shimmer 2s linear infinite;
}

.progress-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer-progress 2s linear infinite;
}

@keyframes progress-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes shimmer-progress {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.progress-text {
  margin-top: 1rem;
  color: #ffb7d5;
  font-family: "Bricolage", sans-serif;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Sparkles Animation */
.loader-sparkles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  font-size: 1rem;
  opacity: 0;
  animation: sparkle-float 3s ease-in-out infinite;
}

.sparkle-1 {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}
.sparkle-2 {
  top: 20%;
  right: 15%;
  animation-delay: 0.5s;
}
.sparkle-3 {
  bottom: 20%;
  left: 25%;
  animation-delay: 1s;
}
.sparkle-4 {
  bottom: 30%;
  right: 20%;
  animation-delay: 1.5s;
}
.sparkle-5 {
  top: 50%;
  left: 10%;
  animation-delay: 2s;
}
.sparkle-6 {
  top: 60%;
  right: 10%;
  animation-delay: 2.5s;
}

@keyframes sparkle-float {
  0%,
  100% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translateY(-20px) rotate(180deg) scale(1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .loader-title {
    font-size: 2.5rem;
  }

  .loader-subtitle {
    font-size: 1rem;
  }

  .wedding-rings {
    width: 100px;
    height: 100px;
  }

  .ring {
    width: 60px;
    height: 60px;
  }

  .ring-2 {
    top: 15px;
    left: 15px;
  }

  .progress-bar {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .loader-title {
    font-size: 2rem;
  }

  .progress-bar {
    width: 200px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .wedding-loader * {
    animation-duration: 0.1s !important;
    animation-iteration-count: 1 !important;
  }
}

/* Fade-out animation for loading screen completion */
.wedding-loader.fade-out {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.wedding-loader.fade-out .loader-content {
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.4s ease-out;
}

.wedding-loader.fade-out .loader-sparkles {
  opacity: 0;
  transform: scale(1.2);
  transition: all 0.5s ease-out 0.1s;
}
