* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  background: linear-gradient(135deg, #ffe0ec, #ffd6a5);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Growlies', cursive;
  overflow: hidden;
}

/* Card */
.card {
  background: white;
  padding: 28px;
  border-radius: 22px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 18px 35px rgba(0,0,0,0.25);
  position: relative;
}

/* Pages */
.page {
  display: block;
}

.hidden {
  display: none;
}

/* Text */
.text {
  font-size: 17px;
  color: #444;
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Button */
button {
  padding: 10px 20px;
  border-radius: 22px;
  border: none;
  background: #ff6f91;
  color: white;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  transform: scale(1.08);
}

button:active {
  transform: scale(0.95);
}

/* PHOTO CONTAINER */
.photo-container {
  position: relative;
  display: inline-block;
  margin-top: 40px; /* gives space for cap above */
}

/* PHOTO */
.photo {
  width: 200px;
  border-radius: 16px;
  display: block;
}

/* CAP (NOW ABOVE IMAGE) */
.cap {
  position: absolute;
  top: -70px;   /* THIS pushes it ABOVE */
  left: 50%;
  transform: translateX(-50%) rotate(-10deg);
  width: 80px;
  animation: bounce 1.5s infinite;
  pointer-events: none;
}

@keyframes bounce {
  0%,100% { transform: translate(-50%, 0) rotate(-10deg); }
  50% { transform: translate(-50%, -10px) rotate(-10deg); }
}

/* Floating emojis */
.float {
  position: absolute;
  bottom: -20px;
  font-size: 20px;
  animation: rise 6s linear infinite;
  opacity: 0.8;
}

@keyframes rise {
  0% { transform: translateY(0); }
  100% { transform: translateY(-110vh); opacity: 0; }
}