/* ==========================================================================
   CREZYPDF DIWALI TANK & FIREWORKS CELEBRATION THEME
   - Battle Tank Roll-in, Cannon Shoot to Screen, Big Explosion
   - Corner Firecracker Anars (Left & Right)
   - Background Skyshots & Particle Showers
   - Royal Golden Admin Reveal & Wishes
   ========================================================================== */

/* Fullscreen Overlay Container */
.crezypdf-diwali-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999999;
  background: radial-gradient(ellipse at center, #1a052e 0%, #0d0118 60%, #030006 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  opacity: 1;
  transition: opacity 0.8s ease-out;
}

.crezypdf-diwali-overlay.fading-out {
  opacity: 0;
  pointer-events: none;
}

/* Background Skyshots Canvas */
#crezypdf-skyshots-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Screen Shake Effect */
.crezy-shake-screen {
  animation: crezyScreenShake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes crezyScreenShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10%, 90% { transform: translate(-10px, 6px) rotate(-0.5deg); }
  20%, 80% { transform: translate(10px, -6px) rotate(0.5deg); }
  30%, 70% { transform: translate(-14px, 8px) rotate(-1deg); }
  40%, 60% { transform: translate(14px, -8px) rotate(1deg); }
  50% { transform: translate(-6px, 4px) rotate(-0.3deg); }
}

/* Fullscreen Flash Blast */
.crezy-blast-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #ffffff 0%, #fff7cc 35%, #ff9900 70%, rgba(255, 60, 0, 0) 100%);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
}

.crezy-blast-flash.trigger-flash {
  animation: flashBurst 0.9s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes flashBurst {
  0% { opacity: 0; transform: scale(0.6); }
  15% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* ==========================================================================
   TANK STYLING & ANIMATIONS
   ========================================================================== */
.crezy-tank-stage {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 280px;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.5s ease-out;
}

.crezy-tank-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  animation: tankDriveIn 2.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes tankDriveIn {
  0% {
    transform: translateX(-120vw);
  }
  100% {
    transform: translateX(0);
  }
}

/* Tank Bobbing on Suspension */
.crezy-tank-hull-group {
  animation: tankSuspensionBob 0.35s ease-in-out infinite alternate;
}

@keyframes tankSuspensionBob {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

/* Rotating Road Wheels */
.crezy-tank-wheel {
  transform-origin: center;
  animation: tankWheelRoll 0.3s linear infinite;
}

@keyframes tankWheelRoll {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Turret Aiming Animation */
.crezy-tank-turret {
  transform-origin: 220px 140px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.crezy-tank-turret.aim-forward {
  transform: rotate(-10deg) scaleX(0.92);
}

/* Barrel Muzzle Charging Glow */
.crezy-muzzle-glow {
  position: absolute;
  top: 68px;
  right: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffea00 0%, #ff3300 70%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 15;
}

.crezy-muzzle-glow.charging {
  animation: muzzleCharge 0.8s ease-in-out forwards;
}

@keyframes muzzleCharge {
  0% { opacity: 0; transform: scale(0.2); }
  40% { opacity: 0.8; transform: scale(1.3); }
  80% { opacity: 0.4; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(2.2); filter: drop-shadow(0 0 20px #ff3b00); }
}

/* Recoil Animation when firing */
.crezy-tank-wrapper.tank-recoil {
  animation: tankRecoilKick 0.5s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes tankRecoilKick {
  0% { transform: translateX(0); }
  20% { transform: translateX(-45px) rotate(-1.5deg); }
  60% { transform: translateX(-10px) rotate(0.5deg); }
  100% { transform: translateX(0) rotate(0); }
}

/* Shell Flying Straight to Screen Camera */
.crezy-cannon-shell {
  position: fixed;
  top: 55%;
  left: 50%;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #fffb00 30%, #ff4d00 70%, #990000 100%);
  box-shadow: 0 0 40px #ff6600, 0 0 80px #ffcc00, 0 0 120px #ffffff;
  transform: translate(-50%, -50%) scale(0.01);
  opacity: 0;
  pointer-events: none;
  z-index: 150;
}

.crezy-cannon-shell.fire-shell {
  opacity: 1;
  animation: shellFlyToCamera 0.55s cubic-bezier(0.2, 0.05, 0.35, 1) forwards;
}

@keyframes shellFlyToCamera {
  0% {
    transform: translate(-50%, -50%) scale(0.08);
    opacity: 1;
    filter: blur(0px);
  }
  60% {
    transform: translate(-50%, -50%) scale(5.5);
    opacity: 1;
    filter: blur(1px);
  }
  100% {
    transform: translate(-50%, -50%) scale(36);
    opacity: 1;
    filter: blur(8px);
  }
}

/* ==========================================================================
   CORNER FIRECRACKERS (ANAR FOUNTAINS) - LEFT & RIGHT
   ========================================================================== */
.crezy-corner-firecracker {
  position: absolute;
  bottom: 0;
  width: 240px;
  height: 360px;
  z-index: 25;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.crezy-corner-firecracker.active-anar {
  opacity: 1;
  transform: translateY(0);
}

.crezy-corner-left {
  left: 20px;
}

.crezy-corner-right {
  right: 20px;
}

/* Anar Cone Base */
.crezy-anar-base {
  width: 90px;
  height: 85px;
  background: linear-gradient(135deg, #d97706 0%, #b45309 40%, #78350f 100%);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
  border-bottom: 5px solid #f59e0b;
}

.crezy-anar-pattern {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #fef08a;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Golden Sparks Fountain Canvas */
.crezy-fountain-canvas {
  width: 240px;
  height: 300px;
  margin-bottom: -15px;
  pointer-events: none;
}

/* Diya Accents at base */
.crezy-diya-glow-small {
  font-size: 26px;
  filter: drop-shadow(0 0 12px #ffb700);
  margin: 0 8px;
  animation: diyaFlicker 1.5s ease-in-out infinite alternate;
}

@keyframes diyaFlicker {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px #ffb700); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 18px #ff7700); }
  100% { transform: scale(0.96); filter: drop-shadow(0 0 12px #ffea00); }
}

/* ==========================================================================
   ADMIN DIWALI REVEAL CARD
   ========================================================================== */
.crezy-admin-card-container {
  position: relative;
  z-index: 50;
  max-width: 580px;
  width: 92%;
  padding: 30px 24px 24px;
  border-radius: 28px;
  background: radial-gradient(ellipse at top, #2d0b4d 0%, #170428 60%, #0c0115 100%);
  border: 3px solid #ffc107;
  box-shadow: 
    0 0 40px rgba(255, 193, 7, 0.45),
    0 0 100px rgba(245, 158, 11, 0.25),
    inset 0 0 35px rgba(255, 193, 7, 0.2),
    0 25px 50px -12px rgba(0, 0, 0, 0.9);
  text-align: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.2) rotate(-6deg);
  pointer-events: none;
  transition: opacity 0.5s ease-out, transform 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.crezy-admin-card-container.reveal-card {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  pointer-events: auto;
}

/* Top Shubh Title */
.crezy-shubh-title {
  font-size: 16px;
  font-weight: 800;
  color: #fef08a;
  letter-spacing: 2px;
  text-shadow: 0 0 12px #eab308;
  margin-bottom: 6px;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 6px #facc15); opacity: 0.9; }
  50% { filter: drop-shadow(0 0 16px #f59e0b); opacity: 1; }
}

/* Big 3D Golden Heading */
.crezy-diwali-heading {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 3px;
  margin: 0 0 14px 0;
  background: linear-gradient(135deg, #ffffff 0%, #ffe066 25%, #ffb700 50%, #ff8800 75%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 15px rgba(255, 183, 0, 0.6));
  text-transform: uppercase;
}

/* Admin Image Frame */
.crezy-admin-frame-wrap {
  position: relative;
  display: inline-block;
  margin: 8px auto 16px;
}

.crezy-admin-frame {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, #ffd700 0%, #ff8800 50%, #ffe066 100%);
  box-shadow: 
    0 0 25px rgba(255, 215, 0, 0.8),
    0 0 60px rgba(255, 102, 0, 0.5),
    inset 0 0 15px rgba(255, 255, 255, 0.6);
  position: relative;
  animation: frameRotateGlow 4s ease-in-out infinite alternate;
}

@keyframes frameRotateGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 20px #ffd700); }
  100% { transform: scale(1.03); filter: drop-shadow(0 0 35px #ff6600); }
}

.crezy-admin-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid #ffffff;
  display: block;
}

/* Golden Crown / Diya on top of frame */
.crezy-crown-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 2px solid #fef08a;
  border-radius: 20px;
  padding: 3px 14px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* User's Exact Requested Text: Admin ki trf se sabhi ko deepawli ki harddik shubkamanaye */
.crezy-admin-wish-text {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.4;
  margin: 10px 0 6px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.crezy-admin-wish-highlight {
  display: block;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 30%, #facc15 60%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(250, 204, 21, 0.5));
  margin-top: 4px;
}

.crezy-admin-wish-sub {
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Audio Player Floating Pill */
.crezy-music-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.4);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  color: #fef08a;
  margin: 12px 0 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.crezy-music-pill:hover {
  background: rgba(255, 215, 0, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.crezy-equalizer-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.crezy-eq-bar {
  width: 3px;
  background: #facc15;
  border-radius: 2px;
  animation: eqBounce 0.8s ease-in-out infinite alternate;
}

.crezy-eq-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.crezy-eq-bar:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.crezy-eq-bar:nth-child(3) { height: 9px; animation-delay: 0.2s; }
.crezy-eq-bar:nth-child(4) { height: 12px; animation-delay: 0.4s; }

@keyframes eqBounce {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Progress Countdown Bar */
.crezy-progress-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  overflow: hidden;
  margin: 8px 0 16px;
}

.crezy-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #ef4444, #facc15);
  transition: width 0.05s linear;
}

/* Dashboard Action Buttons */
.crezy-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crezy-btn-dashboard {
  flex: 1;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  color: #fff !important;
  font-weight: 800;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid #fef08a;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.5);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.crezy-btn-dashboard:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.75);
  color: #fff !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .crezy-tank-stage {
    width: 380px;
    height: 220px;
    bottom: 8%;
  }
  .crezy-diwali-heading {
    font-size: 28px;
  }
  .crezy-admin-wish-text {
    font-size: 17px;
  }
  .crezy-admin-wish-highlight {
    font-size: 19px;
  }
  .crezy-admin-frame {
    width: 170px;
    height: 170px;
  }
  .crezy-admin-card-container {
    padding: 22px 16px 18px;
    width: 95%;
  }
  .crezy-corner-firecracker {
    width: 140px;
    height: 240px;
  }
  .crezy-fountain-canvas {
    width: 140px;
    height: 200px;
  }
  .crezy-anar-base {
    width: 60px;
    height: 55px;
  }
}
