/* Basic Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #c8a2c8;
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 90vw;
  max-width: 600px;
  background: #5d3a5a;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 0 20px #bb6fc8;
  text-align: center;
  position: relative;
}

/* Pages */
.page {
  display: none;
  animation: fadeIn 0.7s ease forwards;
}

.page.active {
  display: block;
}

/* Buttons */
button {
  background-color: #d48de0;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 5px 15px rgba(212, 141, 224, 0.5);
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #aa6db7;
}

/* Balloons container */
.balloons {
  position: relative;
  height: 150px;
  margin: 20px 0;
  /* You can add balloon animations here later */
}

/* Gallery tree */

.tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: growTree 1.5s ease-out forwards;
  transform: scaleY(0);
  transform-origin: bottom center;
  margin-top: 20px;
}

@keyframes growTree {
  to {
    transform: scaleY(1);
  }
}

.branch {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 15px 0;
}

.bloom {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 20px;
  transform: scale(0);
  opacity: 0;
  animation: bloomIn 0.8s ease-out forwards;
}

.branch .bloom:nth-child(1) {
  animation-delay: 0.3s;
}
.branch .bloom:nth-child(2) {
  animation-delay: 0.6s;
}
.branch .bloom:nth-child(3) {
  animation-delay: 0.9s;
}

@keyframes bloomIn {
  to {
    transform: scale(1) rotateY(360deg);
    opacity: 1;
  }
}

/* Typed message */
#typedMessage {
  font-size: 1.2rem;
  min-height: 50px;
  margin-top: 20px;
  letter-spacing: 1.1px;
}

/* Cake styles (3D) */

.cake {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 40px auto 20px;
  perspective: 600px;
}

.cake-layer {
  width: 180px;
  height: 60px;
  border-radius: 90px / 30px;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.15);
  position: absolute;
  left: 50%;
  transform-style: preserve-3d;
  transform-origin: center bottom;
  transition: transform 0.5s ease;
}

.layer1 {
  top: 140px;
  transform: translateX(-50%) translateZ(0) scaleY(1);
  background: linear-gradient(135deg, #ffb347, #ffcc33);
  box-shadow: 0 10px 15px rgba(255, 165, 0, 0.5);
}

.layer2 {
  top: 90px;
  transform: translateX(-50%) translateZ(-40px) scaleY(0.9);
  background: linear-gradient(135deg, #f6d365, #fda085);
  box-shadow: 0 8px 10px rgba(255, 140, 0, 0.5);
  z-index: 2;
}

.layer3 {
  top: 40px;
  transform: translateX(-50%) translateZ(-80px) scaleY(0.8);
  background: linear-gradient(135deg, #fbc7a4, #e3a985);
  box-shadow: 0 5px 8px rgba(255, 120, 0, 0.5);
  z-index: 3;
}

/* Candle */
.candle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 12px;
  height: 60px;
  background: #fff9c4;
  border-radius: 3px;
  transform: translateX(-50%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

/* Flame animation */
.flame {
  position: absolute;
  top: -15px;
  left: 50%;
  width: 14px;
  height: 24px;
  background: radial-gradient(circle at 50% 50%, #ffec61, #f12711);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 3px #ff4500);
  animation: flicker 1.2s infinite ease-in-out alternate;
}

@keyframes flicker {
  0% {
    transform: translateX(-50%) scaleY(1) scaleX(1);
    opacity: 1;
  }

  50% {
    transform: translateX(-50%) scaleY(1.1) scaleX(0.9);
    opacity: 0.8;
  }

  100% {
    transform: translateX(-50%) scaleY(1) scaleX(1);
    opacity: 1;
  }
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
 