/* ==========================================================================
   MINIMALIST CYBERPUNK / APPLE DARK MODE COUNTDOWN
   ========================================================================== */

:root {
  --bg-base: #040407;
  --card-bg: rgba(13, 14, 24, 0.65);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-border-hover: rgba(255, 255, 255, 0.22);
  
  /* Cyberpunk / Apple Neon Glow Hues */
  --neon-pink: #ff2a85;
  --neon-magenta: #c83bf5;
  --neon-purple: #7a3cf5;
  --neon-blue: #00d2ff;
  --neon-cyan: #00f0ff;
  
  --text-primary: #ffffff;
  --text-muted: rgba(225, 230, 255, 0.55);
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-sub: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-card: 28px;
  --radius-card-mobile: 22px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-main);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  padding-top: env(safe-area-inset-top, 20px);
  padding-bottom: env(safe-area-inset-bottom, 20px);
  padding-left: env(safe-area-inset-left, 20px);
  padding-right: env(safe-area-inset-right, 20px);
  background: radial-gradient(circle at 50% 50%, #0c0d18 0%, #050509 70%, #020204 100%);
}

/* ==========================================================================
   AMBIENT BACKGROUND & GLOW ORBS
   ========================================================================== */

#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  will-change: transform, opacity;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-pink {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--neon-pink) 0%, rgba(255, 42, 133, 0) 70%);
  top: 15%;
  left: 10%;
  animation-duration: 16s;
}

.orb-blue {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, var(--neon-blue) 0%, rgba(0, 210, 255, 0) 70%);
  bottom: 15%;
  right: 10%;
  animation-duration: 20s;
  animation-delay: -5s;
}

.orb-violet {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--neon-purple) 0%, rgba(122, 60, 245, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.25;
  animation-duration: 24s;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(35px, -30px) scale(1.12);
  }
  100% {
    transform: translate(-30px, 35px) scale(0.95);
  }
}

/* ==========================================================================
   APP VIEWPORT & COUNTDOWN LAYOUT
   ========================================================================== */

.app-viewport {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  padding: 24px;
}

.countdown-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  perspective: 1000px;
}

/* ==========================================================================
   GLASSMORPHISM TIME CARDS
   ========================================================================== */

.time-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 38px 20px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--card-border);
  box-shadow: 
    0 24px 48px -12px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), 
              box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.35s ease;
  overflow: hidden;
}

.time-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--card-border-hover);
  box-shadow: 
    0 30px 60px -15px rgba(0, 0, 0, 0.85),
    0 0 25px rgba(181, 55, 242, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

/* Card Subtle Inner Glow */
.card-glass-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  pointer-events: none;
}

/* Neon Beam Line on Top Border */
.card-border-beam {
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--neon-pink) 25%, 
    var(--neon-magenta) 50%, 
    var(--neon-blue) 75%, 
    transparent 100%);
  opacity: 0.85;
  filter: drop-shadow(0 0 8px var(--neon-magenta));
}

#card-days .card-border-beam {
  background: linear-gradient(90deg, transparent 0%, var(--neon-pink) 50%, transparent 100%);
  filter: drop-shadow(0 0 8px var(--neon-pink));
}

#card-hours .card-border-beam {
  background: linear-gradient(90deg, transparent 0%, var(--neon-magenta) 50%, transparent 100%);
  filter: drop-shadow(0 0 8px var(--neon-magenta));
}

#card-minutes .card-border-beam {
  background: linear-gradient(90deg, transparent 0%, var(--neon-purple) 50%, transparent 100%);
  filter: drop-shadow(0 0 8px var(--neon-purple));
}

#card-seconds .card-border-beam {
  background: linear-gradient(90deg, transparent 0%, var(--neon-blue) 50%, transparent 100%);
  filter: drop-shadow(0 0 8px var(--neon-blue));
}

.card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ==========================================================================
   DIGITS & TYPOGRAPHY
   ========================================================================== */

.digit-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}

.digit-value {
  font-size: clamp(3rem, 6.5vw, 5.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  text-shadow: 
    0 0 20px rgba(255, 255, 255, 0.4),
    0 0 40px rgba(200, 59, 245, 0.35);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Individual Gradient Accents for Numbers */
#card-days .digit-value {
  background: linear-gradient(180deg, #ffffff 30%, #ff8ec2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(255, 42, 133, 0.4));
}

#card-hours .digit-value {
  background: linear-gradient(180deg, #ffffff 30%, #e08aff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(200, 59, 245, 0.4));
}

#card-minutes .digit-value {
  background: linear-gradient(180deg, #ffffff 30%, #ab8eff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(122, 60, 245, 0.4));
}

#card-seconds .digit-value {
  background: linear-gradient(180deg, #ffffff 30%, #70e6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(0, 210, 255, 0.4));
}

/* Unit Label */
.unit-label {
  margin-top: 14px;
  font-family: var(--font-sub);
  font-size: clamp(0.72rem, 1.2vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Subtle Pulse on Second Tick */
.tick-pulse {
  animation: numberPulse 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes numberPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (IPHONE & MOBILE OPTIMIZATION)
   ========================================================================== */

@media (max-width: 820px) {
  .countdown-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 440px;
  }
  
  .time-card {
    border-radius: var(--radius-card-mobile);
    padding: 30px 16px 22px;
  }
  
  .digit-wrapper {
    min-height: 70px;
  }
  
  .digit-value {
    font-size: clamp(2.8rem, 13vw, 4.2rem);
  }
  
  .unit-label {
    margin-top: 10px;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
  }
  
  .orb-pink {
    width: 260px;
    height: 260px;
  }
  
  .orb-blue {
    width: 280px;
    height: 280px;
  }
  
  .orb-violet {
    width: 320px;
    height: 320px;
  }
}

@media (max-width: 380px) {
  .countdown-container {
    gap: 12px;
  }
  
  .time-card {
    padding: 24px 12px 18px;
  }
  
  .digit-value {
    font-size: 2.5rem;
  }
  
  .unit-label {
    font-size: 0.65rem;
  }
}
