* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --pink: #ff4f9a;
  --purple: #7f5cff;
  --blue: #55d6ff;
  --yellow: #ffd166;
  --white: #ffffff;
  --dark: #120b2f;
  --red: #ff315e;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #080514;
  color: white;
  overflow-x: hidden;
}

button {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.app {
  width: 100%;
  min-height: 100vh;
}

.scene {
  width: 100%;
  min-height: 100vh;
  display: none;
  position: relative;
  overflow: hidden;
}

.scene.active {
  display: flex;
}

/* WELCOME */
.scene-welcome {
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.38), transparent 18%),
    radial-gradient(circle at 80% 20%, rgba(255, 209, 102, 0.36), transparent 18%),
    linear-gradient(135deg, #ff66a3, #7f5cff 48%, #42d9ff);
}

.scene-welcome::before {
  content: "";
  position: absolute;
  inset: -50%;
  background:
    conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0.15),
      rgba(255, 79, 154, 0.25),
      rgba(85, 214, 255, 0.25),
      rgba(255, 209, 102, 0.2),
      rgba(255, 255, 255, 0.15)
    );
  animation: rotateBg 14s linear infinite;
  opacity: 0.75;
}

.welcome-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.55;
  animation: floatBlob 7s ease-in-out infinite;
}

.blob-1 {
  width: 170px;
  height: 170px;
  left: 7%;
  top: 13%;
  background: rgba(255, 255, 255, 0.35);
}

.blob-2 {
  width: 130px;
  height: 130px;
  right: 8%;
  bottom: 13%;
  background: rgba(255, 209, 102, 0.48);
  animation-delay: 1.2s;
}

.blob-3 {
  width: 95px;
  height: 95px;
  left: 18%;
  bottom: 19%;
  background: rgba(85, 214, 255, 0.5);
  animation-delay: 2.3s;
}

.spark,
.float-icon {
  position: absolute;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.85);
}

.spark {
  font-size: 34px;
  animation: twinkle 2s ease-in-out infinite;
}

.float-icon {
  font-size: 38px;
  animation: iconFloat 4s ease-in-out infinite;
}

.spark-1 { top: 15%; right: 23%; }
.spark-2 { bottom: 24%; left: 13%; animation-delay: 0.8s; }
.spark-3 { top: 28%; left: 22%; animation-delay: 1.3s; }
.spark-4 { bottom: 15%; right: 17%; animation-delay: 1.8s; }

.icon-1 { left: 9%; bottom: 15%; }
.icon-2 { right: 11%; top: 25%; animation-delay: 1.1s; }
.icon-3 { left: 15%; top: 18%; animation-delay: 1.8s; }

.welcome-card {
  width: min(92vw, 500px);
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 38px 28px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(22px);
  box-shadow:
    0 35px 80px rgba(18, 11, 47, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.28);
  transform-style: preserve-3d;
  animation: welcomeFloat 4s ease-in-out infinite;
}

.welcome-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 12px 25px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.badge.glass {
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
}

.welcome-card h1 {
  font-size: clamp(38px, 9vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  margin: 18px 0 16px;
  letter-spacing: -1.4px;
  text-shadow: 0 15px 35px rgba(0, 0, 0, 0.24);
}

.welcome-card p {
  font-size: 15px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 30px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
  padding: 15px 24px;
  border-radius: 999px;
  color: white;
  font-size: 15px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff4f9a, #7f5cff);
  box-shadow:
    0 18px 35px rgba(255, 79, 154, 0.42),
    inset 0 2px 0 rgba(255, 255, 255, 0.28);
  transition: 0.25s ease;
}

.primary-btn b {
  display: inline-flex;
  transition: 0.25s ease;
}

.primary-btn:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 24px 48px rgba(255, 79, 154, 0.48),
    inset 0 2px 0 rgba(255, 255, 255, 0.28);
}

.primary-btn:hover b {
  transform: translateX(4px);
}

/* SHARED VIDEO SCENES */
.scene-party,
.scene-gift {
  display: none;
  min-height: 100vh;
  color: white;
}

.scene-party.active,
.scene-gift.active {
  display: block;
}

.page-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) brightness(0.76) saturate(1.18);
  transform: scale(1.02);
  z-index: 0;
}

.page-overlay,
.gift-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.page-overlay {
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.10), transparent 28%),
    radial-gradient(circle at 20% 80%, rgba(255, 79, 154, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(8, 5, 20, 0.16), rgba(8, 5, 20, 0.44));
}

.gift-overlay {
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.12), transparent 26%),
    radial-gradient(circle at 30% 75%, rgba(255, 49, 94, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(8, 5, 20, 0.2), rgba(8, 5, 20, 0.64));
}

.moving-light,
.gift-orb {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(35px);
  opacity: 0.3;
  z-index: 2;
  animation: lightMove 8s ease-in-out infinite;
}

.light-1,
.gift-orb-1 {
  top: 10%;
  left: -80px;
  background: #ff4f9a;
}

.light-2,
.gift-orb-2 {
  right: -100px;
  bottom: 8%;
  background: #55d6ff;
  animation-delay: 2s;
}

.party-content,
.gift-content {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  width: 100%;
  padding: 36px 18px 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.party-header,
.gift-header {
  width: min(94vw, 680px);
  text-align: center;
  animation: showUp 0.8s ease both;
}

.party-header h2,
.cake-text h2,
.gift-header h2 {
  margin: 16px 0 10px;
  font-size: clamp(29px, 7vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.9px;
  text-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.party-header p,
.cake-text p,
.gift-header p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.7;
}

/* BALLOONS */
.balloon-stage {
  position: relative;
  width: min(96vw, 780px);
  height: 440px;
  margin-top: 20px;
  perspective: 900px;
  animation: showUp 0.9s ease 0.2s both;
}

.balloon {
  position: absolute;
  width: 92px;
  height: 122px;
  background: transparent;
  transform-style: preserve-3d;
  animation:
    balloonFloat 3.8s ease-in-out infinite,
    balloonDrift 7s ease-in-out infinite;
}

.balloon span {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 50% 50% 46% 46%;
  box-shadow:
    inset -18px -22px 30px rgba(0, 0, 0, 0.22),
    inset 15px 12px 22px rgba(255, 255, 255, 0.36),
    0 24px 38px rgba(0, 0, 0, 0.3);
}

.balloon span::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 22px;
  width: 20px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  filter: blur(1px);
  transform: rotate(26deg);
}

.balloon span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  background: inherit;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.balloon i {
  position: absolute;
  top: 122px;
  left: 50%;
  width: 2px;
  height: 105px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.52);
  border-radius: 999px;
}

.balloon i::before,
.balloon i::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top: none;
  border-left: none;
  border-radius: 50%;
}

.balloon i::before {
  left: -18px;
  top: 14px;
  transform: rotate(35deg);
}

.balloon i::after {
  right: -18px;
  top: 34px;
  transform: rotate(-35deg);
}

.balloon-1 { left: 5%; top: 90px; }
.balloon-1 span { background: linear-gradient(145deg, #ff4f9a, #ff9ecb); }

.balloon-2 { left: 22%; top: 34px; animation-delay: 0.5s; }
.balloon-2 span { background: linear-gradient(145deg, #55d6ff, #4267ff); }

.balloon-3 { left: 42%; top: 118px; animation-delay: 1s; }
.balloon-3 span { background: linear-gradient(145deg, #ffd166, #ff8c2a); }

.balloon-4 { right: 22%; top: 40px; animation-delay: 1.4s; }
.balloon-4 span { background: linear-gradient(145deg, #b7ff6d, #1fc96b); }

.balloon-5 { right: 6%; top: 104px; animation-delay: 0.9s; }
.balloon-5 span { background: linear-gradient(145deg, #c77dff, #6b35ff); }

.balloon-6 { left: 35%; bottom: 24px; animation-delay: 1.9s; }
.balloon-6 span { background: linear-gradient(145deg, #ff8fab, #fb3f7f); }

.balloon.popped {
  pointer-events: none;
  animation: balloonPop 0.4s ease forwards;
}

.pop-item {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  pointer-events: none;
  font-size: 26px;
  animation: popParticle 850ms ease-out forwards;
}

/* CAKE */
.cake-section {
  width: min(94vw, 760px);
  text-align: center;
  margin-top: 28px;
  animation: showUp 0.8s ease both;
}

.cake-text {
  margin-bottom: 18px;
}

.cake-hero {
  position: relative;
  width: min(96vw, 760px);
  margin: 0 auto 10px;
  min-height: 520px;
}

.cake-glow {
  position: absolute;
  left: 50%;
  bottom: 40px;
  width: min(88vw, 540px);
  height: 180px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 229, 152, 0.26), transparent 50%),
    radial-gradient(circle at 30% 50%, rgba(255, 79, 154, 0.18), transparent 36%),
    radial-gradient(circle at 70% 50%, rgba(85, 214, 255, 0.14), transparent 36%);
  filter: blur(22px);
  animation: glowPulse 3s ease-in-out infinite;
}

.cake-stage {
  position: relative;
  width: min(96vw, 700px);
  margin: 0 auto;
  animation: cakeStageFloat 3.8s ease-in-out infinite;
}

.cake-image {
  width: 100%;
  max-width: 700px;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 28px 32px rgba(0,0,0,0.34));
}

.candle-layer {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 29%;
  height: 18%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.candle {
  position: absolute;
  bottom: 0;
  width: 11%;
  height: 78%;
  min-width: 12px;
  min-height: 56px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.25)),
    repeating-linear-gradient(
      135deg,
      #ffffff 0 8px,
      #ff61a6 8px 16px
    );
  box-shadow:
    inset -5px -9px 10px rgba(0,0,0,0.16),
    inset 4px 5px 8px rgba(255,255,255,0.26),
    0 6px 12px rgba(0,0,0,0.28);
}

.candle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 118%;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(0,0,0,0.10);
  filter: blur(1px);
}

.candle-1 { left: 4%; transform: rotate(-7deg); }
.candle-2 { left: 30%; bottom: 10%; transform: rotate(3deg); }
.candle-3 { right: 30%; bottom: 10%; transform: rotate(-3deg); }
.candle-4 { right: 4%; transform: rotate(7deg); }

.wick {
  position: absolute;
  left: 50%;
  top: -10px;
  width: 3px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #2d1d36;
}

.flame {
  position: absolute;
  left: 50%;
  top: -43px;
  width: 22px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(circle at 50% 70%, #fff8b8 0 18%, #ffd84e 34%, #ff8c1a 70%);
  box-shadow:
    0 0 16px rgba(255, 214, 82, 0.95),
    0 0 38px rgba(255, 140, 26, 0.65);
  transform-origin: bottom center;
  animation: flameMove 0.18s ease-in-out infinite alternate;
}

.flame::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 8px;
  height: 13px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(255,255,255,0.75);
  filter: blur(1px);
}

.flame.off {
  animation: flameOff 0.45s ease forwards;
}

.smoke-box {
  position: absolute;
  left: 50%;
  top: 7%;
  width: 36%;
  height: 110px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 15;
}

.smoke-box span {
  position: absolute;
  bottom: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.72);
  filter: blur(4px);
  animation: smokeUp 1.7s ease-out forwards;
}

.smoke-box span:nth-child(1) { left: 12%; }
.smoke-box span:nth-child(2) { left: 34%; animation-delay: 0.15s; }
.smoke-box span:nth-child(3) { left: 58%; animation-delay: 0.3s; }
.smoke-box span:nth-child(4) { left: 78%; animation-delay: 0.45s; }

.cake-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* GIFT PAGE */
.gift-click-area {
  position: relative;
  width: min(92vw, 410px);
  height: 390px;
  margin-top: 32px;
  background: transparent;
  border: none;
  display: grid;
  place-items: center;
  animation: showUp 0.8s ease both;
}

.gift-object {
  position: relative;
  width: 280px;
  height: 250px;
  transform-style: preserve-3d;
  transition: 0.55s ease;
  filter: drop-shadow(0 26px 28px rgba(0,0,0,0.35));
  animation: giftIdle 2.6s ease-in-out infinite;
}

.gift-body {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 250px;
  height: 178px;
  transform: translateX(-50%);
  border-radius: 26px 26px 34px 34px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.22), transparent 22%),
    linear-gradient(145deg, #ff315e, #ae1230);
  box-shadow:
    inset -20px -22px 32px rgba(0,0,0,0.22),
    inset 14px 12px 20px rgba(255,255,255,0.22),
    0 18px 30px rgba(0,0,0,0.25);
  overflow: hidden;
}

.gift-lid {
  position: absolute;
  left: 50%;
  top: 28px;
  width: 285px;
  height: 78px;
  transform: translateX(-50%);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.24), transparent 22%),
    linear-gradient(145deg, #ff547b, #cf173b);
  box-shadow:
    inset -14px -14px 22px rgba(0,0,0,0.2),
    inset 12px 10px 20px rgba(255,255,255,0.22),
    0 13px 22px rgba(0,0,0,0.26);
  transition: 0.55s ease;
  z-index: 4;
}

.vertical-ribbon {
  position: absolute;
  left: 50%;
  top: 0;
  width: 52px;
  height: 100%;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, #ffd9e3, #fff, #ffd9e3);
  box-shadow:
    inset -5px 0 10px rgba(0,0,0,0.12),
    inset 5px 0 10px rgba(255,255,255,0.5);
}

.horizontal-ribbon {
  position: absolute;
  left: 0;
  top: 70px;
  width: 100%;
  height: 46px;
  background:
    linear-gradient(180deg, #fff, #ffd2de);
  box-shadow:
    inset 0 -6px 10px rgba(0,0,0,0.10),
    inset 0 5px 10px rgba(255,255,255,0.5);
}

.lid-ribbon {
  position: absolute;
  left: 50%;
  top: 0;
  width: 54px;
  height: 100%;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, #ffd9e3, #fff, #ffd9e3);
  border-radius: 8px;
}

.gift-bow {
  position: absolute;
  top: -45px;
  background:
    linear-gradient(145deg, #fff, #ffd1dd);
  box-shadow:
    inset -9px -8px 13px rgba(0,0,0,0.11),
    0 9px 14px rgba(0,0,0,0.18);
}

.bow-left {
  left: 82px;
  width: 65px;
  height: 48px;
  border-radius: 55% 45% 50% 50%;
  transform: rotate(-24deg);
}

.bow-right {
  right: 82px;
  width: 65px;
  height: 48px;
  border-radius: 45% 55% 50% 50%;
  transform: rotate(24deg);
}

.bow-center {
  left: 50%;
  top: -26px;
  width: 38px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    linear-gradient(145deg, #fff, #ffc3d3);
}

.gift-light {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,235,160,0.55), transparent 64%);
  filter: blur(16px);
  opacity: 0;
  transform: scale(0.6);
  transition: 0.55s ease;
}

/* Gift open states */
.gift-click-area.open-1 .gift-object {
  transform: scale(0.88) rotate(-3deg);
}

.gift-click-area.open-1 .gift-lid {
  transform: translateX(-50%) translateY(-38px) rotate(-8deg);
}

.gift-click-area.open-1 .gift-light {
  opacity: 0.45;
  transform: scale(0.9);
}

.gift-click-area.open-2 .gift-object {
  transform: scale(0.72) rotate(3deg);
}

.gift-click-area.open-2 .gift-lid {
  transform: translateX(-50%) translateY(-70px) translateX(24px) rotate(14deg);
}

.gift-click-area.open-2 .gift-light {
  opacity: 0.65;
  transform: scale(1.05);
}

.gift-click-area.open-3 .gift-object {
  transform: scale(0.54) rotate(-2deg);
}

.gift-click-area.open-3 .gift-lid {
  opacity: 0.72;
  transform: translateX(-50%) translateY(-105px) translateX(-42px) rotate(-28deg);
}

.gift-click-area.open-3 .gift-light {
  opacity: 0.85;
  transform: scale(1.24);
}

.gift-click-area.open-4 {
  pointer-events: none;
}

.gift-click-area.open-4 .gift-object {
  opacity: 0;
  transform: scale(0.26) translateY(30px) rotate(12deg);
}

.gift-click-area.open-4 .gift-light {
  opacity: 1;
  transform: scale(1.5);
}

.flower-reveal {
  position: relative;
  width: min(94vw, 710px);
  margin: 0 auto;
  text-align: center;
  animation: showUp 0.8s ease both;
}

.flower-glow {
  position: absolute;
  left: 50%;
  top: 12px;
  width: min(88vw, 430px);
  height: 250px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, rgba(255, 49, 94, 0.28), transparent 62%),
    radial-gradient(circle at 55% 35%, rgba(255,255,255,0.18), transparent 45%);
  border-radius: 50%;
  filter: blur(18px);
}

.flower-image {
  position: relative;
  width: min(88vw, 450px);
  max-height: 430px;
  object-fit: contain;
  margin: 6px auto 22px;
  display: block;
  filter:
    drop-shadow(0 30px 30px rgba(0,0,0,0.35))
    drop-shadow(0 0 28px rgba(255,49,94,0.18));
  animation: flowerFloat 3.6s ease-in-out infinite;
}

/* MESSAGE */
.message-card {
  width: min(92vw, 690px);
  margin: 14px auto 0;
  padding: 26px 24px 28px;
  border-radius: 34px;
  text-align: left;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(18px);
  box-shadow:
    0 28px 65px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.message-badge {
  margin-bottom: 18px;
}

.type-text {
  width: 100%;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(15px, 4vw, 18px);
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.type-text::after {
  content: "|";
  display: inline-block;
  margin-left: 2px;
  font-weight: 900;
  animation: blink 0.8s infinite;
}

/* EFFECT */
.confetti-layer,
.pop-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 80;
}

.confetti {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 4px;
  animation: confettiFall linear forwards;
}

.hidden {
  display: none !important;
}

/* ANIMATIONS */
@keyframes rotateBg { to { transform: rotate(360deg); } }

@keyframes floatBlob {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(26px, -24px, 0) scale(1.08); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.82) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(12deg); }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

@keyframes welcomeFloat {
  0%, 100% { transform: perspective(900px) rotateX(4deg) translateY(0); }
  50% { transform: perspective(900px) rotateX(4deg) translateY(-13px); }
}

@keyframes lightMove {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(70px, -45px, 0) scale(1.2); }
}

@keyframes balloonFloat {
  0%, 100% { transform: translateY(0) rotateZ(-4deg) rotateY(-8deg); }
  50% { transform: translateY(-34px) rotateZ(5deg) rotateY(10deg); }
}

@keyframes balloonDrift {
  0%, 100% { margin-left: 0; }
  50% { margin-left: 18px; }
}

@keyframes balloonPop {
  0% { opacity: 1; transform: scale(1) rotateZ(0); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.9) rotateZ(25deg); filter: blur(6px); }
}

@keyframes popParticle {
  0% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.25) rotate(220deg); }
}

@keyframes cakeStageFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.92; transform: translateX(-50%) scale(1.04); }
}

@keyframes flameMove {
  from { transform: translateX(-50%) rotate(-5deg) scale(1); }
  to { transform: translateX(-50%) rotate(5deg) scale(1.1); }
}

@keyframes flameOff {
  to {
    opacity: 0;
    transform: translateX(-50%) scale(0.1);
    filter: blur(5px);
  }
}

@keyframes smokeUp {
  0% { opacity: 0.75; transform: translateY(0) scale(0.8); }
  100% { opacity: 0; transform: translateY(-105px) scale(2.5); }
}

@keyframes giftIdle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes flowerFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.012); }
}

@keyframes showUp {
  from { opacity: 0; transform: translateY(26px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(-30px) rotate(0deg); }
  100% { opacity: 0; transform: translateY(110vh) rotate(760deg); }
}

@keyframes blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

/* MOBILE */
@media (max-width: 560px) {
  .scene-welcome { padding: 18px; }

  .welcome-card {
    padding: 34px 22px;
    border-radius: 30px;
  }

  .party-content,
  .gift-content {
    padding: 30px 14px 60px;
  }

  .balloon-stage {
    width: 100%;
    height: 410px;
    margin-top: 12px;
  }

  .balloon {
    width: 70px;
    height: 96px;
  }

  .balloon i {
    top: 96px;
    height: 82px;
  }

  .balloon-1 { left: 4%; top: 100px; }
  .balloon-2 { left: 23%; top: 42px; }
  .balloon-3 { left: 45%; top: 124px; }
  .balloon-4 { right: 19%; top: 48px; }
  .balloon-5 { right: 3%; top: 114px; }
  .balloon-6 { left: 36%; bottom: 52px; }

  .cake-hero {
    min-height: 345px;
  }

  .cake-glow {
    width: 90vw;
    height: 120px;
    bottom: 20px;
  }

  .cake-stage {
    width: 96vw;
  }

  .cake-image {
    width: 100%;
  }

  .candle-layer {
    top: 11%;
    width: 31%;
    height: 18%;
  }

  .candle {
    min-width: 10px;
    min-height: 42px;
  }

  .flame {
    width: 16px;
    height: 24px;
    top: -30px;
  }

  .smoke-box {
    top: 6%;
    width: 40%;
    height: 80px;
  }

  .gift-click-area {
    height: 340px;
    margin-top: 22px;
  }

  .gift-object {
    width: 235px;
    height: 220px;
  }

  .gift-body {
    width: 215px;
    height: 154px;
  }

  .gift-lid {
    width: 245px;
    height: 68px;
    top: 26px;
  }

  .bow-left {
    left: 66px;
  }

  .bow-right {
    right: 66px;
  }

  .flower-image {
    width: min(94vw, 390px);
    max-height: 390px;
  }

  .message-card {
    padding: 24px 20px 26px;
    border-radius: 28px;
    margin-top: 14px;
  }

  .type-text {
    line-height: 1.78;
  }
}
