/* ==========================================================================
   Regalo Digital - Unboxing FX, Particle Layer & Modal Styles
   ========================================================================== */

/* Fullscreen Particle Canvas Overlay */
.particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 45;
}

/* Ambient Radial Glow during unboxing */
.unboxing-ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-glow) 0%, rgba(112, 0, 255, 0.2) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.8s ease;
}

.unboxing-ambient-glow.is-active {
  transform: translate(-50%, -50%) scale(1.6);
  opacity: 1;
}

/* Floating Emoji Rain Items (DOM mode fallback/enhancement) */
.floating-emoji {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 40;
  animation: emojiFloatUp linear forwards;
}

@keyframes emojiFloatUp {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translateY(-50px) rotate(45deg) scale(1.2);
  }
  85% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-800px) rotate(360deg) scale(0.8);
    opacity: 0;
  }
}

/* Share Modal Popup */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 8, 22, 0.75);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: rgba(30, 25, 55, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 90%;
  max-width: 500px;
  color: #fff;
  box-shadow: var(--shadow-lg), 0 0 50px var(--primary-glow);
  transform: scale(0.85);
  transition: transform 0.3s var(--transition-bounce);
  position: relative;
  text-align: center;
}

.modal-backdrop.is-open .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}

.modal-title {
  font-size: 1.6rem;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-light-muted);
  margin-bottom: 20px;
}

.share-url-box {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 6px;
  margin-bottom: 20px;
}

.share-url-input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}

.btn-copy-url {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-copy-url:hover {
  background: var(--primary-hover);
}

.social-share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.btn-social-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: transform 0.2s ease;
}

.btn-social-share:hover {
  transform: translateY(-2px);
}

.share-whatsapp { background: #25D366; }
.share-telegram { background: #0088cc; }
.share-messenger { background: #0084FF; }
