/* ==========================================================================
   UpaySathi Festive Diwali Stylesheet (शुभ दीपावली)
   Rockets, Firecrackers, Glowing Diyas, and Post-Login Celebration Transition
   ========================================================================== */

/* 1. Festive Body & Atmosphere */
body.diwali-celebration-theme {
  background: radial-gradient(ellipse at 50% 15%, #1f0d3d 0%, #100624 50%, #05010d 100%) !important;
  color: #f8fafc !important;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Fireworks Canvas */
.diwali-fireworks-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 1;
}

/* 2. Hanging Decorative Festive Toran / Garland */
.diwali-toran-garland {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 24px;
  background: repeating-linear-gradient(
    90deg,
    #ff9800 0px,
    #ff9800 18px,
    #ffc107 18px,
    #ffc107 36px,
    #4caf50 36px,
    #4caf50 44px,
    #e91e63 44px,
    #e91e63 60px
  );
  box-shadow: 0 4px 18px rgba(255, 152, 0, 0.45);
  z-index: 10;
  opacity: 0.92;
}
.diwali-toran-garland::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 8px;
  background-image: radial-gradient(circle, #ffe082 2.5px, transparent 3px);
  background-size: 16px 8px;
  animation: fairyLightsFlicker 1.8s infinite alternate;
}

@keyframes fairyLightsFlicker {
  0% { opacity: 0.55; filter: drop-shadow(0 0 2px #ffc107); }
  100% { opacity: 1; filter: drop-shadow(0 0 8px #ffeb3b); }
}

/* 3. "Happy Diwali" Hero Banner on Homepage */
.diwali-hero-banner {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 680px;
  margin: 28px auto 14px auto;
  padding: 16px 20px;
  text-align: center;
  background: rgba(18, 9, 36, 0.75);
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 193, 7, 0.25);
  animation: floatDiwaliBanner 4s ease-in-out infinite;
}

@keyframes floatDiwaliBanner {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.diwali-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* Animated Diya with Flickering Flame */
.diwali-diya-flame-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.diwali-emoji {
  font-size: 38px;
  display: inline-block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  animation: diyaGlowPulse 2s infinite ease-in-out;
}
@keyframes diyaGlowPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.6)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 16px rgba(255, 87, 34, 0.9)); transform: scale(1.06); }
}

.diwali-text-box {
  flex: 1;
}

.diwali-shubh-title {
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  color: #ffca28;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 202, 40, 0.7);
  margin-bottom: 2px;
}

.diwali-golden-heading {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(30px, 5.5vw, 44px);
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1.1;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 0%, #ffe082 25%, #ffd54f 50%, #ff9800 75%, #ff6f00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 18px rgba(255, 193, 7, 0.75));
  animation: shimmerGoldenTitle 3s ease-in-out infinite;
}

@keyframes shimmerGoldenTitle {
  0%, 100% { filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 14px rgba(255, 193, 7, 0.65)); }
  50% { filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 28px rgba(255, 145, 0, 0.95)); }
}

.diwali-wishes-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffe082;
  margin-top: 6px;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.diwali-tagline-text {
  font-size: 12px;
  color: #ffd54f;
  opacity: 0.9;
  margin-top: 2px;
}

.diwali-interactive-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 215, 0, 0.25);
  font-size: 11.5px;
  color: #ffecb3;
}

.diwali-sound-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #ffe082;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.diwali-sound-btn:hover {
  background: rgba(255, 215, 0, 0.25);
  color: #ffffff;
}

/* 4. Auth Container & Card Styling during Diwali */
body.diwali-celebration-theme main.auth {
  position: relative;
  z-index: 5;
  padding-top: 10px;
}

body.diwali-celebration-theme .auth-form {
  background: rgba(255, 255, 255, 0.97) !important;
  border-radius: 20px !important;
  border: 1.5px solid rgba(255, 215, 0, 0.5) !important;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 193, 7, 0.25) !important;
  backdrop-filter: blur(12px) !important;
}

body.diwali-celebration-theme .auth-header {
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  background-color: #1a0f30 !important;
}

body.diwali-celebration-theme .btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 15px rgba(234, 88, 12, 0.4) !important;
  transition: all 0.2s ease-in-out !important;
}
body.diwali-celebration-theme .btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%) !important;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.6) !important;
  transform: translateY(-1px);
}

/* 5. Fullscreen Diwali Transition Overlay (After Login, Before Dashboard) */
.diwali-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999999;
  background: radial-gradient(ellipse at 50% 30%, #20083b 0%, #0d0219 60%, #030008 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.diwali-transition-overlay.fading-out {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

#diwali-transition-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 1;
}

.diwali-transition-card {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 580px;
  background: rgba(18, 9, 36, 0.88);
  border: 2px solid #ffd700;
  border-radius: 26px;
  padding: 34px 28px;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 50px rgba(255, 193, 7, 0.4);
  animation: diwaliCardPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes diwaliCardPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

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

.diwali-diya-glow {
  font-size: 42px;
  display: inline-block;
  animation: diyaGlowPulse 1.8s infinite ease-in-out;
}

.diwali-sparkle-icon {
  font-size: 26px;
  color: #ffd700;
  animation: sparkleSpin 3s linear infinite;
}

@keyframes sparkleSpin {
  0% { transform: rotate(0deg) scale(0.9); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(0.9); }
}

.diwali-badge-pill {
  display: inline-block;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.25) 0%, rgba(255, 87, 34, 0.25) 100%);
  border: 1px solid rgba(255, 215, 0, 0.6);
  color: #ffecb3;
  padding: 5px 18px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  box-shadow: 0 0 14px rgba(255, 193, 7, 0.3);
}

.diwali-trans-heading {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(34px, 7vw, 48px);
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1.1;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 0%, #fff9c4 20%, #ffd54f 50%, #ff9800 80%, #ff6f00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 25px rgba(255, 193, 7, 0.8));
}

.diwali-trans-welcome {
  color: #ffca28;
  font-size: 16px;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.diwali-trans-quote {
  font-size: 13.5px;
  color: #f8fafc;
  line-height: 1.6;
  margin: 16px auto 20px auto;
  max-width: 480px;
}
.diwali-trans-quote .text-light-gold {
  color: #ffe082;
  font-weight: 600;
}

/* Progress Bar */
.diwali-countdown-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.diwali-countdown-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffc107 0%, #ff9800 50%, #ff5722 100%);
  border-radius: 10px;
  box-shadow: 0 0 10px #ffc107;
  transition: width 0.1s linear;
}

.diwali-countdown-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffca28;
}

.diwali-skip-btn {
  border-color: #ffd700 !important;
  color: #ffd700 !important;
  border-radius: 20px !important;
  transition: all 0.2s ease !important;
}
.diwali-skip-btn:hover {
  background: #ffd700 !important;
  color: #120924 !important;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.6) !important;
}

/* 6. Topbar Pill for Replaying Fireworks in Dashboard */
.diwali-topbar-pill {
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #ea580c 100%) !important;
  color: #ffffff !important;
  border: 1px solid #fbbf24 !important;
  border-radius: 20px !important;
  padding: 5px 12px !important;
  margin-top: 4px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5) !important;
  transition: all 0.2s ease-in-out !important;
  cursor: pointer;
}
.diwali-topbar-pill:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #f97316 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.8) !important;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .diwali-hero-banner {
    margin: 18px 12px 10px 12px;
    padding: 12px 14px;
    border-radius: 16px;
  }
  .diwali-emoji {
    font-size: 28px;
  }
  .diwali-golden-heading {
    letter-spacing: 1.5px;
  }
  .diwali-wishes-text {
    font-size: 12px;
  }
  .diwali-transition-card {
    padding: 24px 18px;
    border-radius: 20px;
  }
}
