* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Comfortaa', sans-serif;
  background: linear-gradient(135deg, #ffd6e8 0%, #cde3ff 50%, #fff5c2 100%);
  min-height: 100vh;
  color: #333;
  overflow-x: hidden;
}

.hero {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 60px 20px 40px;
}
.cake { font-size: 72px; animation: bounce 2s ease-in-out infinite; }
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-top: 10px;
  color: #d63384;
  text-shadow: 2px 2px 0 #fff;
}
.name {
  background: linear-gradient(90deg, #d63384, #fd7e14, #198754);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle { margin-top: 14px; font-size: 1.15rem; color: #555; }

.wishes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}
.wish {
  background: rgba(255,255,255,.7);
  padding: 10px 16px;
  border-radius: 30px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  animation: pop .6s ease both;
}
.wish:nth-child(2){animation-delay:.1s}
.wish:nth-child(3){animation-delay:.2s}
.wish:nth-child(4){animation-delay:.3s}
@keyframes pop { from { transform: scale(.5); opacity:0 } to { transform: scale(1); opacity:1 } }

.gifts-photo {
  position: relative;
  z-index: 10;
  text-align: center;
  margin: 14px auto 0;
  padding: 10px 16px 0;
}
.gifts-hint {
  font-weight: 700;
  font-size: 1.15rem;
  color: #7048e8;
  margin-bottom: 18px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }

.gifts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center;
}
.gift-box {
  position: relative;
  width: 130px;
  height: 140px;
  border: none;
  cursor: pointer;
  background: linear-gradient(160deg, #ff85b3, #e0338a);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(224,51,138,.35), inset 0 -8px 0 rgba(0,0,0,.12);
  font-size: 44px;
  color: #fff;
  padding: 0;
  transition: transform .18s;
  animation: pop .7s ease both;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.gift-box:nth-child(1){animation-delay:.05s}
.gift-box:nth-child(2){animation-delay:.12s}
.gift-box:nth-child(3){animation-delay:.19s}
.gift-box:nth-child(4){animation-delay:.26s}
.gift-box:nth-child(5){animation-delay:.33s}
.gift-box:nth-child(6){animation-delay:.4s}
.gift-box:hover { transform: translateY(-6px) scale(1.05); }
.gift-box:active { transform: scale(.96); }

/* разные цвета коробок */
.gift-box.g1, .gift-box.g1 .gb-flap { background: linear-gradient(160deg, #ff85b3, #e0338a); }
.gift-box.g2, .gift-box.g2 .gb-flap { background: linear-gradient(160deg, #6db3ff, #2f7fd6); }
.gift-box.g3, .gift-box.g3 .gb-flap { background: linear-gradient(160deg, #5ee6a8, #1fae74); }
.gift-box.g4, .gift-box.g4 .gb-flap { background: linear-gradient(160deg, #ffe066, #f5b301); }
.gift-box.g5, .gift-box.g5 .gb-flap { background: linear-gradient(160deg, #b197fc, #7048e8); }
.gift-box.g6, .gift-box.g6 .gb-flap { background: linear-gradient(160deg, #ffa94d, #f76707); }

/* лента поперёк */
.gift-box::after {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 20px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 2px rgba(0,0,0,.06);
  z-index: 2;
}

.gb-lid {
  position: absolute;
  left: -8px; right: -8px; top: -16px;
  height: 40px;
  background: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.35), rgba(255,255,255,.1));
  border: 3px solid rgba(255,255,255,.85);
  border-radius: 12px;
  font-size: 24px;
  line-height: 34px;
  z-index: 4;
  transition: transform .45s cubic-bezier(.3,1.6,.5,1), opacity .4s;
  box-shadow: 0 6px 14px rgba(0,0,0,.2);
}

/* картинка подарка внутри коробки */
.gb-img {
  position: absolute;
  left: 50%; top: 54%;
  width: 112px; height: auto;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 8px;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.25));
  transition: transform .5s cubic-bezier(.3,1.7,.5,1) .15s;
}

.gb-emoji {
  position: absolute;
  left: 50%; top: 34%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 34px;
  z-index: 2;
  transition: transform .5s cubic-bezier(.3,1.7,.5,1) .15s;
}

/* подпись сюрприза в коробке */
.gb-surprise {
  position: absolute;
  left: 50%; top: 86%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 12px;
  font-weight: 700;
  color: #3d3a5c;
  white-space: nowrap;
  z-index: 2;
  background: rgba(255,255,255,.9);
  padding: 3px 8px;
  border-radius: 20px;
  box-shadow: 0 3px 8px rgba(0,0,0,.15);
  transition: transform .5s cubic-bezier(.3,1.7,.5,1) .3s, opacity .3s;
  opacity: 0;
}
.gift-box.open .gb-surprise {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* створки коробки */
.gb-flap {
  position: absolute;
  top: 16px; bottom: 0;
  width: 50%;
  z-index: 3;
  border: none;
  background: inherit;
  opacity: 0;
  transition: transform .5s ease, opacity .2s;
}
.gb-flap.left { left: 0; transform-origin: left center; border-radius: 14px 0 0 14px; }
.gb-flap.right { right: 0; transform-origin: right center; border-radius: 0 14px 14px 0; }

.gift-box.open .gb-lid {
  transform: translateY(-70px) rotate(-16deg);
  opacity: 0;
}
.gift-box.open .gb-img { transform: translate(-50%, -56%) scale(1); }
.gift-box.open .gb-emoji { transform: translate(-50%, -50%) scale(1); }
.gift-box.open .gb-flap { opacity: 1; }
.gift-box.open .gb-flap.left { transform: rotateY(75deg); }
.gift-box.open .gb-flap.right { transform: rotateY(-75deg); }
.gift-box.open {
  box-shadow: 0 6px 16px rgba(0,0,0,.2), inset 0 -8px 0 rgba(0,0,0,.12);
  background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.65)) !important;
}
.gift-box.open::after { opacity: .35; }
.gift-box.open:hover { transform: none; }

.gifts-caption {
  margin-top: 20px;
  font-weight: 700;
  font-size: 1.15rem;
  color: #d63384;
  min-height: 1.5em;
}

/* вспышка конфетти при открытии */
.burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.burst i {
  position: absolute;
  width: 10px; height: 14px;
  border-radius: 2px;
  animation: burstFly .9s ease-out forwards;
}
@keyframes burstFly {
  0% { transform: translate(0,0) rotate(0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(540deg) scale(.4); opacity: 0; }
}

.poems-section {
  position: relative;
  z-index: 10;
  max-width: 960px;
  margin: 20px auto 0;
  padding: 30px 16px 10px;
  text-align: center;
}
.poems-section h2 {
  color: #7048e8;
  margin-bottom: 20px;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}
.poems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.poem {
  background: rgba(255,255,255,.75);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  transition: transform .2s, box-shadow .2s;
  animation: pop .7s ease both;
  position: relative;
  overflow: hidden;
}
.poem:nth-child(1){animation-delay:.05s}
.poem:nth-child(2){animation-delay:.15s}
.poem:nth-child(3){animation-delay:.25s}
.poem:nth-child(4){animation-delay:.35s}
.poem::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(255,214,101,.7), transparent 70%);
  border-radius: 50%;
}
.poem:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 16px 36px rgba(0,0,0,.16);
}
.poem-emoji { font-size: 40px; margin-bottom: 10px; }
.poem p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: #3d3a5c;
  font-weight: 700;
  white-space: normal;
}

.footer-note {
  position: relative;
  z-index: 10;
  text-align: center;
  margin: 46px auto 70px;
  font-size: 1.2rem;
  color: #d63384;
  font-weight: 700;
}
