* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  background: linear-gradient(135deg, #f7971e, #ffd200, #ff6b6b);
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  width: 100%;
  height: 100%;
}

.particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  bottom: -40px;
  opacity: 0.35;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  from {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  to {
    transform: translateY(-110vh) rotate(360deg) scale(1.3);
  }
}

.container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.page {
  text-align: center;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 32px 25px;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  animation: fadeIn 0.6s ease;
}

.age-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b6b, #f7971e);
  color: white;
  font-family: "Pacifico", cursive;
  font-size: 3.2rem;
  width: 90px;
  height: 90px;
  line-height: 90px;
  border-radius: 50%;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.45);
  animation: popIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
  from {
    transform: scale(0) rotate(-15deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

h1 {
  color: white;
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0 0 18px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

h1 .name {
  font-family: "Pacifico", cursive;
  font-size: 2.4rem;
  display: block;
}

.card {
  background: white;
  border-radius: 20px;
  padding: 22px;
  color: #333;
  line-height: 1.8;
  font-size: 0.97rem;
  margin-bottom: 22px;
  text-align: left;
}

.main-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #ff6b6b, #f7971e);
  color: white;
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  animation: pulse 2s infinite;
}

.main-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(255, 107, 107, 0.5);
  animation: none;
}

.heart-inline {
  display: inline-block;
  animation: heartBeat 1.2s infinite;
  transform-origin: center;
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.3);
  }
  40% {
    transform: scale(1);
  }
  60% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }
  70% {
    transform: scale(1.04);
    box-shadow: 0 0 0 14px rgba(255, 107, 107, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 1.6rem;
  }
  h1 .name {
    font-size: 2rem;
  }
  .age-badge {
    font-size: 2.6rem;
    width: 78px;
    height: 78px;
    line-height: 78px;
  }
  .card {
    font-size: 0.9rem;
  }
}
