* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #ffe4ef, #fff7d6);
  overflow: hidden;
  color: #5c2a3d;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 28px;
  text-align: center;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

p {
  font-size: 18px;
  max-width: 560px;
  line-height: 1.5;
}

button {
  margin-top: 22px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: #ff5f9e;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

#hud {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  z-index: 10;
  font-size: 18px;
  font-weight: bold;
}

#gameArea {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.cake {
  position: absolute;
  top: -70px;
  font-size: 44px;
  cursor: pointer;
  user-select: none;
  animation: wiggle 0.5s infinite alternate;
}

.pop {
  transform: scale(1.4);
  opacity: 0;
  transition: 0.2s;
}

#bigCake {
  font-size: 120px;
  animation: rise 1s ease-out;
}

#candles {
  font-size: 38px;
  margin-top: 8px;
}

#rachelPhoto {
  width: min(82vw, 390px);
  max-height: 460px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
  margin: 24px 0;
  background: white;
}

.from {
  font-size: 22px;
  font-weight: bold;
}

.confetti {
  position: fixed;
  top: -20px;
  font-size: 22px;
  animation: fallConfetti 3s linear forwards;
  z-index: 99;
}

.balloon {
  position: fixed;
  bottom: -80px;
  font-size: 44px;
  animation: floatBalloon 5s linear forwards;
  z-index: 98;
}

@keyframes wiggle {
  from {
    transform: rotate(-8deg);
  }
  to {
    transform: rotate(8deg);
  }
}

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

@keyframes fallConfetti {
  to {
    transform: translateY(110vh) rotate(720deg);
  }
}

@keyframes floatBalloon {
  to {
    transform: translateY(-120vh);
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 30px;
  }

  #hud {
    font-size: 16px;
  }

  .cake {
    font-size: 42px;
  }
}
