/* ===================================================================
   BIRTHDAY CAKE, CANDLE BLOW, WISH CEREMONY & FOOTER
   Interactive Flame, Smoke Puff, Celebration Card, Glow Effects
   =================================================================== */

.cake-section {
  padding: 60px 0 80px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.cake-stage {
  position: relative;
  width: 320px;
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin: 30px auto;
  cursor: pointer;
  user-select: none;
}

/* The Candle */
.candle-wrapper {
  position: absolute;
  top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
}

.candle-wrapper:hover {
  transform: scale(1.06);
}

/* Candle flame with realistic flicker */
.candle-flame {
  width: 18px;
  height: 32px;
  background: radial-gradient(ellipse at bottom, #fff5cc 0%, #ffcc00 45%, #ff6600 80%, rgba(255, 60, 0, 0.2) 100%);
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  box-shadow: 
    0 0 16px #ffcc00, 
    0 0 35px rgba(255, 170, 0, 0.6), 
    0 -10px 20px rgba(255, 120, 0, 0.3);
  animation: flickerFlame 1.2s infinite alternate ease-in-out;
  transform-origin: bottom center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.candle-wrapper.blown .candle-flame {
  opacity: 0;
  transform: scale(0.2) translateY(-10px);
}

@keyframes flickerFlame {
  0% {
    transform: scale(1) rotate(-1deg);
    box-shadow: 0 0 16px #ffcc00, 0 0 32px rgba(255, 170, 0, 0.6);
  }
  25% {
    transform: scale(1.05, 0.95) rotate(1.5deg);
  }
  50% {
    transform: scale(0.95, 1.05) rotate(-1.5deg);
    box-shadow: 0 0 20px #ffd700, 0 0 38px rgba(255, 180, 0, 0.7);
  }
  75% {
    transform: scale(1.02, 0.98) rotate(0.8deg);
  }
  100% {
    transform: scale(0.98, 1.02) rotate(-0.5deg);
    box-shadow: 0 0 15px #ffb700, 0 0 30px rgba(255, 160, 0, 0.5);
  }
}

/* Smoke puff when candle is blown */
.candle-smoke {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  background: rgba(180, 170, 170, 0.6);
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0;
  pointer-events: none;
}

.candle-wrapper.blown .candle-smoke {
  animation: smokePuff 1.6s ease-out forwards;
}

@keyframes smokePuff {
  0% {
    opacity: 0.8;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-30px) scale(3) translateX(6px);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(5) translateX(-10px);
  }
}

/* Candle Wick */
.candle-wick {
  width: 3px;
  height: 10px;
  background: #333333;
  border-radius: 2px;
}

/* Candle Body */
.candle-stick {
  width: 14px;
  height: 52px;
  background: repeating-linear-gradient(
    45deg,
    #ffffff,
    #ffffff 6px,
    #f8a5b5 6px,
    #f8a5b5 12px
  );
  border-radius: 4px;
  box-shadow: inset -2px 0 3px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* The Layered Birthday Cake */
.cake-graphic {
  position: relative;
  width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cake Tier Top */
.cake-tier-top {
  width: 150px;
  height: 58px;
  background: #fff8f0;
  border-radius: 14px 14px 0 0;
  position: relative;
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(230, 210, 200, 0.7);
  z-index: 2;
}

/* Cake Frosting Drips */
.cake-frosting {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  background: #f7a8b8;
  border-radius: 14px 14px 10px 10px;
  box-shadow: 0 3px 6px rgba(230, 90, 110, 0.25);
}

.cake-frosting::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 10px;
  right: 10px;
  height: 8px;
  background-image: radial-gradient(circle at 6px 0, #f7a8b8 6px, transparent 7px);
  background-size: 16px 8px;
}

/* Berries on top */
.cake-berries {
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 0 18px;
}

.berry {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 35% 35%, #ff4d6d, #b81432);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(150, 20, 40, 0.3);
}

/* Cake Tier Bottom */
.cake-tier-bottom {
  width: 220px;
  height: 75px;
  background: #faede0;
  border-radius: 12px 12px 0 0;
  position: relative;
  border: 1px solid rgba(220, 200, 190, 0.8);
  box-shadow: inset 0 -5px 8px rgba(0, 0, 0, 0.06);
  z-index: 1;
}

.cake-tier-bottom .cake-frosting {
  background: #fbc4d0;
}

.cake-tier-bottom .cake-frosting::after {
  background-image: radial-gradient(circle at 6px 0, #fbc4d0 6px, transparent 7px);
}

/* Cake Plate */
.cake-plate {
  width: 260px;
  height: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #ece5dc 100%);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(70, 50, 50, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(210, 195, 185, 0.6);
  z-index: 3;
}

/* Wish Prompt & Card */
.cake-prompt-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #ffffff;
  border: 1px dashed var(--blush-400);
  border-radius: var(--radius-full);
  color: var(--blush-deep);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  margin-top: 15px;
  animation: pulseWish 2s infinite ease-in-out;
}

@keyframes pulseWish {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.wish-granted-card {
  max-width: 500px;
  margin-top: 25px;
  background: linear-gradient(135deg, #fff2f5 0%, #fdf0ec 100%);
  border: 1.5px solid var(--blush-300);
  padding: 24px 30px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: none;
}

.wish-granted-card.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  display: block;
}

.wish-granted-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--blush-deep);
  margin-bottom: 8px;
}

.wish-granted-desc {
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.6;
}

/* ───────────────────────────────────────────────────────────────────
   FOOTER
   ─────────────────────────────────────────────────────────────────── */
.bday-footer {
  padding: 50px 20px 70px 20px;
  text-align: center;
  border-top: 1px solid rgba(220, 205, 195, 0.5);
  margin-top: 50px;
  position: relative;
  z-index: 10;
}

.footer-flower-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: inline-block;
  animation: gentleSway 3s ease-in-out infinite alternate;
}

@keyframes gentleSway {
  0% { transform: rotate(-8deg); }
  100% { transform: rotate(8deg); }
}

.footer-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.replay-bloom-btn {
  background: #ffffff;
  border: 1px solid var(--blush-300);
  color: var(--blush-deep);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.replay-bloom-btn:hover {
  background: var(--blush-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

