:root {
  --card: rgba(255, 255, 255, 0.78);
  --accent: #ff5f87;
  --muted: #5f5f68;
  --glass-blur: 10px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #222;
  -webkit-font-smoothing: antialiased;
  background: url('countdown-bg-1.jpeg') center center / cover no-repeat fixed;
  transition: background-image 1s ease-in-out;
  animation: bgChange 18s infinite alternate ease-in-out;
}

/* Background image fade animation between the two images */
@keyframes bgChange {
  0%, 45% {
    background-image: url('countdown-bg-1.jpeg');
  }
  55%, 100% {
    background-image: url('countdown-bg-2.jpeg');
  }
}

.wrap {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  width: 100%;
  background: var(--card);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(20, 20, 30, 0.12);
  backdrop-filter: blur(var(--glass-blur));
  text-align: center;
}

.title h1 {
  margin: 0;
  font-family: "Dancing Script", "Georgia", serif;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #2a2430;
}

.subtitle {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
}

.countdown {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.unit {
  width: 110px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(30, 30, 40, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.unit:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(30, 30, 40, 0.1);
}

.number {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  color: #1f1a24;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.date {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

.footer-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}

.celebrate {
  margin-top: 14px;
  color: var(--accent);
  font-weight: 700;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

/* Responsive */
@media (max-width: 520px) {
  .unit { width: 84px; padding: 12px; }
  .countdown { gap: 8px; }
}
