/* ==========================================================================
   EV Urjavahan - Magical Diwali Celebration Effects
   Active for 5 seconds on website load, then smoothly dissolves
   ========================================================================== */

#diwali-magic-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  opacity: 1;
  visibility: visible;
}

#diwali-magic-container.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Background Ambient Festive Vignette */
.diwali-magic-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(255, 153, 51, 0.12) 0%, rgba(10, 5, 20, 0.45) 85%);
  pointer-events: none;
}

/* Fullscreen Canvas for Fireworks */
#diwali-fireworks-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Hanging Decorative Fairy Lights across top */
.diwali-fairy-lights {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 10;
}

.diwali-bulb {
  position: relative;
  width: 14px;
  height: 22px;
  border-radius: 50% 50% 45% 45%;
  animation: bulbFlicker 1.2s infinite alternate ease-in-out;
}

.diwali-bulb::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 3px;
  width: 8px;
  height: 6px;
  background: #2d3748;
  border-radius: 2px;
}

.diwali-bulb.gold {
  background: #ffd700;
  box-shadow: 0 4px 20px #ffd700, 0 8px 35px rgba(255, 215, 0, 0.8);
  animation-delay: 0.1s;
}

.diwali-bulb.orange {
  background: #ff6f00;
  box-shadow: 0 4px 20px #ff6f00, 0 8px 35px rgba(255, 111, 0, 0.8);
  animation-delay: 0.3s;
}

.diwali-bulb.green {
  background: #00e676;
  box-shadow: 0 4px 20px #00e676, 0 8px 35px rgba(0, 230, 118, 0.8);
  animation-delay: 0.5s;
}

.diwali-bulb.purple {
  background: #e040fb;
  box-shadow: 0 4px 20px #e040fb, 0 8px 35px rgba(224, 64, 251, 0.8);
  animation-delay: 0.7s;
}

.diwali-bulb.red {
  background: #ff1744;
  box-shadow: 0 4px 20px #ff1744, 0 8px 35px rgba(255, 23, 68, 0.8);
  animation-delay: 0.9s;
}

@keyframes bulbFlicker {
  0% {
    opacity: 0.75;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Central Floating Festive Greeting Card */
.diwali-greeting-card {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -20px) scale(0.9);
  background: rgba(18, 10, 30, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 2px solid rgba(255, 215, 0, 0.65);
  border-radius: 24px;
  padding: 24px 34px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 35px rgba(255, 180, 0, 0.45);
  color: #ffffff;
  pointer-events: auto;
  z-index: 20;
  max-width: 90%;
  width: 480px;
  animation: diwaliGreetingIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes diwaliGreetingIn {
  to {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

.diwali-diyas-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}

.diwali-diya-icon {
  font-size: 32px;
  display: inline-block;
  animation: diyaSwing 2s infinite ease-in-out alternate;
  filter: drop-shadow(0 0 12px #ff9800);
}

@keyframes diyaSwing {
  0% { transform: translateY(0) rotate(-4deg); }
  100% { transform: translateY(-4px) rotate(4deg); }
}

.diwali-title-hindi {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff275 0%, #ff8c00 50%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.diwali-title-eng {
  font-size: 17px;
  font-weight: 700;
  color: #ffeedb;
  margin-bottom: 6px;
}

.diwali-subtext {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
  line-height: 1.4;
}

.diwali-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 215, 0, 0.18);
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: #ffd700;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* 5s Auto-Dissolve Timer Progress Bar */
.diwali-timer-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff1744, #ff9100, #ffd700);
  width: 100%;
  border-radius: 0 0 24px 24px;
  animation: diwaliTimerDrain 5s linear forwards;
}

@keyframes diwaliTimerDrain {
  from { width: 100%; }
  to { width: 0%; }
}

/* Quick Dismiss Button */
.diwali-skip-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}

.diwali-skip-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: scale(1.1);
}

@media (max-width: 576px) {
  .diwali-greeting-card {
    top: 15%;
    padding: 18px 20px;
    width: 92%;
  }

  .diwali-title-hindi {
    font-size: 22px;
  }

  .diwali-title-eng {
    font-size: 15px;
  }

  .diwali-diya-icon {
    font-size: 26px;
  }
}
