/* ====================================================================
   NOVATRADE - EPIC LAUNCH COUNTDOWN SYSTEM
   Obsidian Dark Palette, Liquid Gold Glow & Cinematic Reveal
   ==================================================================== */

/* Lock body scroll when countdown is active */
body.countdown-active {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Hide the main website content while countdown is active */
body.countdown-active > *:not(#countdownOverlay):not(#countdownRevealFlash) {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

/* Base Fullscreen Overlay */
#countdownOverlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background-color: #06090E;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Cinematic Unlock State */
#countdownOverlay.countdown-finished {
  opacity: 0;
  transform: scale(1.08);
  filter: blur(16px);
  pointer-events: none;
}

/* Background Atmosphere */
.countdown-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* Radial Light Beams */
.countdown-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.countdown-orb-center {
  width: 700px;
  height: 700px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.05) 45%, transparent 70%);
  animation: countdownPulseOrb 8s ease-in-out infinite alternate;
}

.countdown-orb-blue {
  width: 550px;
  height: 550px;
  top: 15%;
  right: 10%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14) 0%, transparent 65%);
  animation: countdownFloatOrb 12s ease-in-out infinite alternate;
}

.countdown-orb-emerald {
  width: 500px;
  height: 500px;
  bottom: 10%;
  left: 10%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 65%);
  animation: countdownFloatOrb 14s ease-in-out infinite alternate-reverse;
}

/* Subtle Cyber Mesh / Grid */
.countdown-mesh {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(212, 175, 55, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
  opacity: 0.8;
}

/* Canvas for High-Performance Golden Particles */
#countdownParticlesCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Main Content Container */
.countdown-content {
  position: relative;
  z-index: 10;
  max-width: 1050px;
  width: 90%;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 3.8rem);
}

/* Pure Monumental Headline */
.countdown-title {
  font-family: var(--font-main, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: #FFFFFF;
  margin: 0;
  text-align: center;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFFFF 30%, #F3E5AB 65%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 35px rgba(212, 175, 55, 0.45)) drop-shadow(0 0 75px rgba(212, 175, 55, 0.2));
  animation: countdownTitleFloat 6s ease-in-out infinite;
}

/* The Countdown Display Grid */
.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  flex-wrap: nowrap;
}

/* Individual Glass Card */
.countdown-unit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: clamp(75px, 16vw, 150px);
  padding: clamp(1rem, 2.8vw, 2.2rem) clamp(0.75rem, 2vw, 1.8rem);
  border-radius: clamp(14px, 2.2vw, 24px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(20, 30, 52, 0.65) 45%, rgba(6, 10, 20, 0.88) 100%);
  border: 1px solid rgba(212, 175, 55, 0.28);
  backdrop-filter: blur(28px) saturate(220%);
  -webkit-backdrop-filter: blur(28px) saturate(220%);
  box-shadow: 
    0 25px 60px -10px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(212, 175, 55, 0.12),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1.5px 1.5px 0 rgba(0, 0, 0, 0.6);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s,
              box-shadow 0.3s;
}

.countdown-unit-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 
    0 35px 75px -10px rgba(0, 0, 0, 0.95),
    0 0 45px rgba(212, 175, 55, 0.28),
    inset 0 2px 2px 0 rgba(255, 255, 255, 0.5);
}

/* Card Subtle Top Reflection */
.countdown-unit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 229, 171, 0.8), transparent);
  pointer-events: none;
}

/* Big Digits */
.countdown-number {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: clamp(2.4rem, 6.5vw, 4.8rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #FFFFFF;
  text-shadow: 
    0 0 25px rgba(212, 175, 55, 0.45),
    0 0 50px rgba(212, 175, 55, 0.2);
  margin-bottom: clamp(0.4rem, 1vw, 0.75rem);
}

/* Unit Label (DAYS, HOURS, MINUTES, SECONDS) */
.countdown-label {
  font-family: var(--font-main, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(0.6rem, 1.2vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #F3E5AB;
  opacity: 0.85;
}

/* Pulsing Colons / Separators */
.countdown-divider {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(0.1rem, 0.5vw, 0.4rem);
}

.countdown-divider-dot {
  width: clamp(5px, 0.8vw, 8px);
  height: clamp(5px, 0.8vw, 8px);
  border-radius: 50%;
  background-color: #D4AF37;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.9), 0 0 24px rgba(212, 175, 55, 0.6);
  animation: countdownColonPulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Epic Reveal Flash Element */
.countdown-reveal-flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #FFFFFF 0%, #D4AF37 40%, rgba(6, 9, 14, 0) 80%);
  opacity: 0;
  pointer-events: none;
  z-index: 1000000;
  transition: opacity 0.5s ease-out;
}

.countdown-reveal-flash.flash-active {
  opacity: 0.9;
}

/* Keyframes */
@keyframes countdownPulseOrb {
  0% {
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
}

@keyframes countdownFloatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-30px, 25px) scale(1.15);
  }
}

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

@keyframes countdownColonPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.85);
  }
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .countdown-content {
    gap: 1.8rem;
    width: 95%;
  }

  .countdown-grid {
    gap: 0.4rem;
  }

  .countdown-unit-card {
    min-width: 68px;
    padding: 0.9rem 0.5rem;
    border-radius: 12px;
  }

  .countdown-divider {
    gap: 8px;
    padding: 0 0.1rem;
  }

  .countdown-label {
    letter-spacing: 0.16em;
  }
}

@media (max-width: 380px) {
  .countdown-unit-card {
    min-width: 58px;
    padding: 0.75rem 0.35rem;
  }
  
  .countdown-divider {
    display: none;
  }
}
