/* Christmas Animation Pack — gifts.css (GiftAnimation) */
.xmas-gift-layer { z-index: 9997; }
.xmas-gift {
  position: absolute; top: 0; left: 0; pointer-events: auto; cursor: pointer;
  will-change: transform; transform-origin: 50% 68%; outline: none;
  -webkit-tap-highlight-color: transparent;
}
.xmas-gift.is-static { position: relative; display: inline-block; }
.xmas-gift-inner { position: relative; width: 100%; height: 100%; transition: filter .25s, transform .25s; }
.xmas-gift svg { display: block; width: 100%; height: 100%; overflow: visible; }
.xmas-gift:hover .xmas-gift-inner, .xmas-gift:focus-visible .xmas-gift-inner {
  filter: drop-shadow(0 0 8px rgba(255, 223, 120, .85)) brightness(1.08); transform: scale(1.06);
}
.xmas-gift.is-falling:not(.is-landed) .gift-shadow { opacity: 0; }
.xmas-gift .gift-lid, .xmas-gift .gift-body, .xmas-gift .gift-inner-glow { transform-box: fill-box; transform-origin: 50% 100%; }

.xmas-gift.is-opening .xmas-gift-inner { animation: xmas-gift-shake .34s ease-in-out; }
.xmas-gift.is-open .gift-lid { animation: xmas-gift-lid 1s cubic-bezier(.2,.7,.3,1) forwards; }
.xmas-gift.is-open .gift-inner-glow { animation: xmas-gift-glow 1.4s ease-out forwards; }
.xmas-gift.is-open .gift-body { animation: xmas-gift-squash .45s ease-out; }
.xmas-gift-rays {
  position: absolute; left: 50%; top: 40%; width: 240%; height: 240%; pointer-events: none;
  transform: translate(-50%, -50%) scale(0); opacity: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,240,180,.55) 0deg 8deg, rgba(255,240,180,0) 8deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 62%); mask: radial-gradient(circle, #000 0 18%, transparent 62%);
}
.xmas-gift.is-open .xmas-gift-rays { animation: xmas-gift-rays 1.4s ease-out forwards; }
.xmas-gift-surprise {
  position: absolute; left: 50%; top: 30%; width: 46%; height: 46%; pointer-events: none;
  transform: translate(-50%, 0) scale(.2); opacity: 0;
  filter: drop-shadow(0 0 6px rgba(255,215,106,.9));
  animation: xmas-gift-surprise 1.5s cubic-bezier(.2,.8,.3,1) forwards;
}
.xmas-gift-surprise svg { width: 100%; height: 100%; }
.xmas-gift.is-leaving { transition: opacity .6s ease; opacity: 0; }

@keyframes xmas-gift-shake {
  0%,100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-9deg) scale(1.04); }
  40% { transform: rotate(8deg) scale(1.06, .96); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg) scale(.96, 1.05); }
}
@keyframes xmas-gift-lid {
  0% { transform: translate(0,0) rotate(0); opacity: 1; }
  35% { transform: translate(14%, -160%) rotate(28deg); opacity: 1; }
  100% { transform: translate(60%, -40%) rotate(110deg); opacity: 0; }
}
@keyframes xmas-gift-glow { 0% { opacity: 0; transform: scale(.6, .3); } 30% { opacity: 1; transform: scale(1.3, 2.6); } 100% { opacity: 0; transform: scale(1.6, 3.4); } }
@keyframes xmas-gift-squash { 0% { transform: scale(1); } 40% { transform: scale(1.1, .88); } 100% { transform: scale(1); } }
@keyframes xmas-gift-rays { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.2) rotate(0); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.1) rotate(60deg); } }
@keyframes xmas-gift-surprise { 0% { opacity: 0; transform: translate(-50%, 0) scale(.2) rotate(-30deg); } 30% { opacity: 1; } 60% { transform: translate(-50%, -140%) scale(1.1) rotate(10deg); opacity: 1; } 100% { transform: translate(-50%, -200%) scale(.9) rotate(0); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .xmas-gift.is-opening .xmas-gift-inner { animation: none; }
  .xmas-gift.is-open .xmas-gift-rays { animation-duration: .6s; }
}
