:root {
  --primary: #2d6a4f;
  --secondary: #40916c;
  --accent: #d4a373;
  --text-dark: #1b4332;
  --bg-color: #e9f5db;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Quicksand", sans-serif;
  background:
    linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
    url("assets/jungle-hero-bg.jpg") center/cover no-repeat fixed;
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

.leaves-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.leaf {
  position: absolute;
  width: 30px;
  height: 30px;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="%2340916c" d="M50 0 C77.6 0 100 22.4 100 50 C100 77.6 50 100 50 100 C50 100 0 77.6 0 50 C0 22.4 22.4 0 50 0 Z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  animation: floatLeaf linear infinite;
}

@keyframes floatLeaf {
  0% {
    transform: translateY(-5%) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(105vh) translateX(50px) rotate(360deg);
    opacity: 0;
  }
}

.card-container {
  z-index: 2;
  padding: 20px;
  width: 100%;
  max-width: 600px;
}

.card {
  background:
    linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)),
    url("assets/boy-bg.jpg") center center/cover no-repeat;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 0 0 10px rgba(255, 255, 255, 0.4);
  padding: 40px;
  text-align: center;
  transform: translateY(20px);
  opacity: 0;
  animation: slideUpCard 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

@keyframes slideUpCard {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.card-content {
  position: relative;
  z-index: 2;
}

h1.title {
  font-family: "Luckiest Guy", cursive;
  font-size: 5.5rem;
  color: #ffffff;
  margin: 20px 0;
  letter-spacing: 6px;
  text-shadow:
    -3px -3px 0 var(--primary),
    3px -3px 0 var(--primary),
    -3px 3px 0 var(--primary),
    3px 3px 0 var(--primary),
    0px 15px 20px rgba(0, 0, 0, 0.4);
  display: inline-block;
  line-height: 1.2;
}

.subtitle {
  font-size: 1.5rem;
  color: #ffffff;
  font-weight: 800;
  margin-bottom: 5px;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

.intro {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffb703;
  margin-bottom: 20px;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
}

.message {
  font-size: 1.2rem;
  line-height: 1.6;
  font-weight: 700;
  margin: 20px 0;
  color: #ffffff;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
}

.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px dashed rgba(255, 255, 255, 0.7);
}

.with-love {
  font-style: italic;
  font-size: 1.2rem;
  color: #f1f1f1;
  font-weight: 600;
  margin-bottom: 5px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.parents {
  font-family: "Chewy", cursive;
  font-size: 2.2rem;
  color: #ffffff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* Animations for text */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.8s ease forwards;
}

.pop-in {
  opacity: 0;
  transform: scale(0.8);
  animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Delays */
.delay-1 {
  animation-delay: 0.8s;
}
.delay-2 {
  animation-delay: 1.2s;
}
.delay-3 {
  animation-delay: 1.8s;
}
.delay-4 {
  animation-delay: 2.3s;
}
.delay-5 {
  animation-delay: 2.8s;
}
.delay-6 {
  animation-delay: 3.3s;
}
.delay-7 {
  animation-delay: 3.8s;
}
.delay-8 {
  animation-delay: 4.3s;
}

/* Event Details (Date & Time) */
.event-details {
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 15px;
  padding: 15px 25px;
  margin: 20px auto;
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 1px dashed rgba(64, 145, 108, 0.5);
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.detail-item .icon {
  font-size: 1.5rem;
}

/* Countdown Timer */
.countdown-wrapper {
  margin: 30px 0 10px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  display: inline-block;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.05),
    0 4px 15px rgba(0, 0, 0, 0.15);
}

.countdown-title {
  font-family: "Chewy", cursive;
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 10px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.time-box {
  background: white;
  border-radius: 12px;
  min-width: 60px;
  padding: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(64, 145, 108, 0.1);
}

.time-val {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
  display: block;
}

.time-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 2px;
}

/* Venue Button */
.venue {
  margin: 25px 0 10px;
}

.venue-btn {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 2px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.venue-btn:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .card-container {
    padding: 0;
    max-width: 100%;
  }

  .card {
    padding: 40px 20px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  h1.title {
    font-size: 3.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .intro,
  .message {
    font-size: 1rem;
  }

  .countdown {
    gap: 8px;
  }

  .time-box {
    min-width: 50px;
    padding: 8px;
  }

  .time-val {
    font-size: 1.4rem;
  }

  .time-label {
    font-size: 0.7rem;
  }
}

/* ─── Confetti Canvas ─────────────────────────────────────────────────────── */
#confetti-canvas {
  display: none;            /* hidden until JS shows it             */
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;     /* never block clicks / touches         */
  z-index: 999;
}
