@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&display=swap');

/* ============================================================
   WaveBlue© Gift Animations — CSS
   Premium overlay animations for gift events
   ============================================================ */

/* --- Overlay Container --- */
.gift-anim-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1000;
  contain: layout style paint;
  isolation: isolate;
}

/* ============================================================
   1. HEART — Herzenregen
   ============================================================ */
.gift-anim-heart-particle {
  position: absolute;
  top: -80px;
  will-change: transform, opacity;
  animation: giftHeartFall linear forwards;
  filter: drop-shadow(0 0 6px rgba(255, 50, 80, 0.6));
  font-size: 30px;
  user-select: none;
}

@keyframes giftHeartFall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  10% {
    opacity: 1;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(calc(100vh + 80px)) translateX(var(--sway, 40px)) rotate(var(--spin, 360deg)) scale(0.6);
    opacity: 0;
  }
}

@keyframes giftHeartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

.gift-anim-heart-particle.pulse {
  animation: giftHeartFall linear forwards, giftHeartPulse 0.8s ease-in-out infinite;
}

/* ============================================================
   2. SKULL — Totenkopf aus dem Boden
   ============================================================ */
.gift-anim-skull-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rotes Glühen */
.gift-anim-skull-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(180, 0, 0, 0.4) 0%, transparent 70%);
  animation: giftSkullGlowPulse 2s ease-in-out infinite;
  will-change: opacity;
}

@keyframes giftSkullGlowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Risse (aus der Mitte) */
.gift-anim-skull-crack {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  overflow: visible;
}

.gift-anim-skull-crack-line {
  position: absolute;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to top, rgba(255, 60, 20, 0.9), transparent);
  transform-origin: bottom center;
  animation: giftSkullCrackGrow 1.5s ease-out forwards;
  will-change: transform, opacity;
}

@keyframes giftSkullCrackGrow {
  0% { height: 0; opacity: 0; }
  100% { height: var(--crack-h, 50px); opacity: 1; }
}

/* Der Totenkopf */
.gift-anim-skull-emoji {
  position: absolute;
  font-size: 250px;
  line-height: 1;
  text-align: center;
  will-change: transform, opacity;
  animation: giftSkullRise 3s ease-out forwards;
  filter: drop-shadow(0 0 30px rgba(200, 0, 0, 0.8));
}

.gift-anim-skull-emoji.exit {
  animation: giftSkullSink 2s ease-in forwards;
}

@keyframes giftSkullRise {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes giftSkullSink {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* Augen-Glühen (pseudo-Elemente über dem Emoji simuliert) */
.gift-anim-skull-eyes {
  position: absolute;
  width: 250px;
  height: 250px;
  will-change: transform, opacity;
  animation: giftSkullRise 3s ease-out forwards;
  pointer-events: none;
}

.gift-anim-skull-eyes.exit {
  animation: giftSkullSink 2s ease-in forwards;
}

.gift-anim-skull-eye {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff2200 0%, rgba(255, 0, 0, 0.6) 50%, transparent 70%);
  animation: giftSkullEyeGlow 0.6s ease-in-out infinite alternate;
  will-change: opacity;
}

.gift-anim-skull-eye.left {
  top: 38%;
  left: 28%;
}

.gift-anim-skull-eye.right {
  top: 38%;
  right: 28%;
}

@keyframes giftSkullEyeGlow {
  0% { opacity: 0.4; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.3); }
}

/* Rauch-Effekt */
.gift-anim-skull-smoke {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(80, 0, 0, 0.3), transparent 70%);
  will-change: transform, opacity;
  animation: giftSkullSmoke var(--smoke-dur, 4s) ease-out forwards;
}

@keyframes giftSkullSmoke {
  0% {
    transform: translateY(0) scale(0.3);
    opacity: 0.5;
  }
  100% {
    transform: translateY(-200px) scale(2.5);
    opacity: 0;
  }
}

/* Screen-Shake */
.gift-anim-shake {
  animation: giftShake 0.15s linear 4;
}

@keyframes giftShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px) translateY(1px); }
  75% { transform: translateX(3px) translateY(-1px); }
}

/* ============================================================
   3. ROSE — Rose wird gereicht
   ============================================================ */
.gift-anim-rose-container {
  position: absolute;
  inset: 0;
}

.gift-anim-rose-main {
  position: absolute;
  left: -200px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 120px;
  will-change: transform, opacity;
  animation: giftRoseSlide 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: drop-shadow(0 0 20px rgba(255, 180, 50, 0.6));
}

.gift-anim-rose-main.exit {
  animation: giftRoseExit 1.5s ease-in forwards;
}

@keyframes giftRoseSlide {
  0% {
    left: -200px;
    opacity: 0;
    transform: translateY(-50%) rotate(-20deg) scale(0.6);
  }
  100% {
    left: calc(50% - 60px);
    opacity: 1;
    transform: translateY(-50%) rotate(0deg) scale(1);
  }
}

@keyframes giftRoseExit {
  0% {
    opacity: 1;
    transform: translateY(-50%) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) rotate(15deg) scale(0.5);
  }
}

/* Goldglanz */
.gift-anim-rose-shine {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 60%);
  animation: giftRoseShine 2s ease-in-out infinite;
  will-change: opacity, transform;
}

@keyframes giftRoseShine {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
}

/* Rosenblätter */
.gift-anim-rose-petal {
  position: absolute;
  width: var(--petal-size, 15px);
  height: var(--petal-size, 15px);
  background: var(--petal-color, #e84070);
  border-radius: 50% 0 50% 50%;
  opacity: 0;
  will-change: transform, opacity;
  animation: giftRosePetalFall var(--petal-dur, 5s) ease-in-out forwards;
  animation-delay: var(--petal-delay, 0s);
}

@keyframes giftRosePetalFall {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  10% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateY(var(--petal-fall, 400px)) translateX(var(--petal-sway, 60px)) rotate(var(--petal-rot, 360deg));
  }
}

/* ============================================================
   4. MIDDLE FINGER — Drei Mittelfinger
   ============================================================ */
.gift-anim-finger-container {
  position: absolute;
  inset: 0;
}

.gift-anim-finger-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(200, 0, 0, 0.25) 0%, transparent 70%);
  animation: giftFingerGlow 1s ease-in-out infinite alternate;
  will-change: opacity;
}

@keyframes giftFingerGlow {
  0% { opacity: 0.3; }
  100% { opacity: 0.8; }
}

.gift-anim-finger {
  position: absolute;
  font-size: 100px;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 15px rgba(255, 50, 50, 0.5));
}

.gift-anim-finger.from-left {
  left: -120px;
  top: 50%;
  transform: translateY(-50%) scaleX(-1);
  animation: giftFingerFromLeft 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.gift-anim-finger.from-right {
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  animation: giftFingerFromRight 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.gift-anim-finger.from-bottom {
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  animation: giftFingerFromBottom 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.gift-anim-finger.wobble {
  animation-name: giftFingerWobble;
  animation-duration: 0.5s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

@keyframes giftFingerFromLeft {
  0% { left: -120px; opacity: 0; }
  100% { left: 10%; opacity: 1; }
}

@keyframes giftFingerFromRight {
  0% { right: -120px; opacity: 0; }
  100% { right: 10%; opacity: 1; }
}

@keyframes giftFingerFromBottom {
  0% { bottom: -120px; opacity: 0; }
  100% { bottom: 15%; opacity: 1; }
}

@keyframes giftFingerWobble {
  0% { transform: rotate(-5deg) scale(1); }
  100% { transform: rotate(5deg) scale(1.08); }
}

.gift-anim-finger.exit {
  animation: giftFingerExit 0.8s ease-in forwards;
}

@keyframes giftFingerExit {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.3); }
}

/* ============================================================
   5. DRAGON — SVG-Path Koerper + Emoji Kopf
   ============================================================ */
.gift-anim-dragon-container {
  position: absolute;
  inset: 0;
}

/* --- Red pulsing screen glow --- */
.gift-anim-dragon-redglow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(200, 0, 0, 0.45) 0%, transparent 70%);
  will-change: opacity;
  animation: giftDragonRedGlow 16s ease-in-out forwards;
}

@keyframes giftDragonRedGlow {
  0%   { opacity: 0; }
  10%  { opacity: 0.2; }
  40%  { opacity: 0.5; }
  70%  { opacity: 0.8; }
  85%  { opacity: 1; }
  95%  { opacity: 1; }
  100% { opacity: 0; }
}

/* --- Side flames (left + right edges) --- */
.gift-anim-dragon-sideflame {
  position: absolute;
  top: 10%;
  width: 60px;
  height: 80%;
  will-change: opacity;
  animation: giftDragonSideFlame 0.3s ease-in-out infinite alternate,
             giftDragonSideFlameFade 16s ease-in-out forwards;
}

.gift-anim-dragon-sideflame.left {
  left: 0;
  background: linear-gradient(to right,
    rgba(255, 80, 0, 0.7) 0%,
    rgba(255, 140, 0, 0.35) 40%,
    transparent 100%
  );
}

.gift-anim-dragon-sideflame.right {
  right: 0;
  background: linear-gradient(to left,
    rgba(255, 80, 0, 0.7) 0%,
    rgba(255, 140, 0, 0.35) 40%,
    transparent 100%
  );
}

@keyframes giftDragonSideFlame {
  0%   { opacity: 0.5; transform: scaleX(0.85); }
  100% { opacity: 1; transform: scaleX(1.15); }
}

@keyframes giftDragonSideFlameFade {
  0%   { opacity: 0; }
  15%  { opacity: 0.4; }
  50%  { opacity: 0.8; }
  80%  { opacity: 1; }
  95%  { opacity: 1; }
  100% { opacity: 0; }
}

/* --- Dragon Head (SVG) --- */
.gift-anim-dragon-head {
  position: absolute;
  width: 140px;
  height: 110px;
  will-change: transform;
  z-index: 10;
  opacity: 0;
  filter: drop-shadow(0 0 20px rgba(255, 100, 0, 0.7));
  user-select: none;
  pointer-events: none;
}

.gift-anim-dragon-head .dragon-svg-head {
  display: block;
  overflow: visible;
}

/* --- Dragon head sub-animations --- */

/* Eye glow pulse */
.dragon-svg-head .dragon-eye-glow {
  animation: dragonEyePulse 1s ease-in-out infinite alternate;
}

@keyframes dragonEyePulse {
  0%   { opacity: 0.3; }
  100% { opacity: 0.9; }
}

/* Whisker wave */
.dragon-svg-head .dragon-whisker {
  animation: dragonWhiskerWave 1.5s ease-in-out infinite alternate;
  transform-origin: 100% 50%;
}

@keyframes dragonWhiskerWave {
  0%   { transform: rotate(0deg) scaleY(1); }
  50%  { transform: rotate(-3deg) scaleY(1.05); }
  100% { transform: rotate(3deg) scaleY(0.95); }
}

/* Mane flutter */
.dragon-svg-head .dragon-mane {
  animation: dragonManeFlutter 0.8s ease-in-out infinite alternate;
  transform-origin: 0% 50%;
}

@keyframes dragonManeFlutter {
  0%   { transform: scaleX(1) skewY(0deg); opacity: 0.8; }
  50%  { transform: scaleX(1.1) skewY(2deg); opacity: 1; }
  100% { transform: scaleX(0.95) skewY(-1deg); opacity: 0.7; }
}

/* Jaw movement */
.dragon-svg-head .dragon-jaw {
  animation: dragonJawMove 2s ease-in-out infinite;
  transform-origin: 15px 58px;
}

@keyframes dragonJawMove {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(3deg); }
  30%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

/* --- SVG Body Layer --- */
.gift-anim-dragon-svg {
  z-index: 9;
  pointer-events: none;
}

/* --- Lava at bottom (grows over time) --- */
.gift-anim-dragon-lava {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(
    to top,
    rgba(255, 60, 0, 0.8) 0%,
    rgba(255, 120, 0, 0.5) 40%,
    rgba(255, 180, 0, 0.2) 70%,
    transparent 100%
  );
  will-change: transform, opacity, height;
  animation: giftDragonLavaGrow 14s ease-out forwards,
             giftDragonLavaWave 1.5s ease-in-out 1s infinite;
}

@keyframes giftDragonLavaGrow {
  0%   { height: 0; opacity: 0; }
  15%  { height: 20px; opacity: 0.6; }
  50%  { height: 55px; opacity: 0.85; }
  80%  { height: 90px; opacity: 1; }
  95%  { height: 100px; opacity: 1; }
  100% { height: 100px; opacity: 0; }
}

@keyframes giftDragonLavaWave {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(1.25); }
}

.gift-anim-dragon-lava-wave {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(
    to top,
    rgba(200, 30, 0, 0.9) 0%,
    rgba(255, 80, 0, 0.4) 60%,
    transparent 100%
  );
  will-change: transform, height;
  animation: giftDragonLavaWave2Grow 14s ease-out forwards,
             giftDragonLavaShift 2s ease-in-out 1s infinite;
}

@keyframes giftDragonLavaWave2Grow {
  0%   { height: 0; }
  15%  { height: 10px; }
  50%  { height: 35px; }
  80%  { height: 60px; }
  95%  { height: 65px; }
  100% { height: 0; }
}

@keyframes giftDragonLavaShift {
  0%, 100% { transform: translateX(-3%) scaleX(1.06); }
  50%      { transform: translateX(3%) scaleX(0.94); }
}

/* --- Lava embers --- */
.gift-anim-dragon-ember {
  position: absolute;
  bottom: 0;
  width: var(--ember-size, 6px);
  height: var(--ember-size, 6px);
  border-radius: 50%;
  background: var(--ember-color, #ff6600);
  will-change: transform, opacity;
  opacity: 0;
  animation: giftDragonEmberRise var(--ember-dur, 2s) ease-out forwards;
  animation-delay: var(--ember-delay, 0s);
  box-shadow: 0 0 4px var(--ember-color, #ff6600);
}

@keyframes giftDragonEmberRise {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(var(--ember-rise, -200px)) translateX(var(--ember-drift, 20px)) scale(0);
    opacity: 0;
  }
}

/* --- Fire breath particles (positioned at head by JS) --- */
.gift-anim-dragon-breath {
  position: absolute;
  width: var(--breath-size, 10px);
  height: var(--breath-size, 10px);
  border-radius: 50%;
  will-change: transform, opacity;
  animation: giftDragonBreath var(--breath-dur, 1.2s) ease-out forwards;
  animation-delay: var(--breath-delay, 0s);
  z-index: 8;
}

@keyframes giftDragonBreath {
  0% {
    transform: translate(0, 0) scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: translate(var(--breath-dx, 0px), var(--breath-dy, 150px)) scale(0);
    opacity: 0;
  }
}

/* --- Finale: head scale-up transition --- */
.gift-anim-dragon-head.finale {
  transition: transform 3s cubic-bezier(0.4, 0, 0.8, 1), opacity 0.5s ease 2.8s;
  filter: drop-shadow(0 0 40px rgba(255, 80, 0, 0.9));
}

/* --- Finale flash --- */
.gift-anim-dragon-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, #fff 0%, rgba(255,120,0,0.6) 40%, transparent 70%);
  will-change: opacity;
  animation: giftDragonFlash 1.2s ease-out forwards;
  z-index: 20;
}

@keyframes giftDragonFlash {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================
   6. NOTE — Notizzettel mit Chat
   ============================================================ */
.gift-anim-note-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
}

.gift-anim-note-paper {
  position: relative;
  width: min(320px, 55%);
  min-height: 220px;
  background: linear-gradient(135deg, #fdf6e3 0%, #f5e6c8 100%);
  border-radius: 4px;
  padding: 24px 20px 20px 20px;
  box-shadow:
    4px 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 0 30px rgba(200, 180, 140, 0.2);
  transform: translateX(-120%) rotate(-3deg);
  will-change: transform, opacity;
  animation: giftNoteSlideIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}

.gift-anim-note-paper.exit {
  animation: giftNoteSlideOut 0.8s ease-in forwards;
}

/* Linierte Linien */
.gift-anim-note-paper::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 15px;
  right: 15px;
  height: calc(100% - 40px);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 27px,
    rgba(150, 180, 220, 0.25) 27px,
    rgba(150, 180, 220, 0.25) 28px
  );
}

/* Rote Randlinie */
.gift-anim-note-paper::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50px;
  width: 2px;
  height: calc(100% - 20px);
  background: rgba(220, 80, 80, 0.25);
}

@keyframes giftNoteSlideIn {
  0% {
    transform: translateX(-120%) rotate(-8deg);
    opacity: 0;
  }
  100% {
    transform: translateX(0) rotate(-2deg);
    opacity: 1;
  }
}

@keyframes giftNoteSlideOut {
  0% {
    transform: translateX(0) rotate(-2deg);
    opacity: 1;
  }
  100% {
    transform: translateX(-120%) rotate(-8deg);
    opacity: 0;
  }
}

.gift-anim-note-line {
  position: relative;
  z-index: 1;
  font-family: 'Caveat', 'Segoe Script', 'Comic Sans MS', cursive;
  font-size: 16px;
  line-height: 28px;
  color: #2a2a4a;
  white-space: nowrap;
  overflow: hidden;
  margin-left: 40px;
}

.gift-anim-note-line .note-name {
  font-weight: 700;
  color: #5544aa;
}

.gift-anim-note-line .note-text {
  color: #333;
}

.gift-anim-note-typing {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #555;
  animation: giftNoteTyping var(--type-dur, 1s) steps(var(--type-steps, 20), end) forwards,
             giftNoteBlink 0.6s step-end infinite;
  width: 0;
  max-width: 100%;
}

.gift-anim-note-typing.done {
  border-right-color: transparent;
  animation: none;
  width: auto;
}

@keyframes giftNoteTyping {
  0% { width: 0; }
  100% { width: var(--type-width, 100%); }
}

@keyframes giftNoteBlink {
  0%, 100% { border-right-color: #555; }
  50% { border-right-color: transparent; }
}

.gift-anim-note-header {
  position: relative;
  z-index: 1;
  font-family: 'Caveat', 'Segoe Script', 'Comic Sans MS', cursive;
  font-size: 20px;
  font-weight: 700;
  color: #8855cc;
  margin-bottom: 10px;
  margin-left: 40px;
  text-decoration: underline;
  text-decoration-color: rgba(136, 85, 204, 0.3);
}

/* ============================================================
   7. THUMBS UP — Daumen hoch mit Konfetti
   ============================================================ */
.gift-anim-thumbsup-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-anim-thumbsup {
  font-size: 120px;
  will-change: transform, opacity;
  animation: giftThumbsBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  filter: drop-shadow(0 0 25px rgba(255, 200, 0, 0.6));
}

.gift-anim-thumbsup.exit {
  animation: giftThumbsExit 0.6s ease-in forwards;
}

@keyframes giftThumbsBounce {
  0% {
    transform: scale(0) rotate(-30deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.3) rotate(5deg);
    opacity: 1;
  }
  80% {
    transform: scale(0.9) rotate(-3deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes giftThumbsExit {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0) rotate(30deg); opacity: 0; }
}

/* Goldene Strahlen */
.gift-anim-thumbsup-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}

.gift-anim-thumbsup-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 80px;
  background: linear-gradient(to top, rgba(255, 215, 0, 0.8), transparent);
  transform-origin: bottom center;
  animation: giftThumbsRayPulse 1.5s ease-in-out infinite;
  will-change: opacity;
}

@keyframes giftThumbsRayPulse {
  0%, 100% { opacity: 0.3; transform: rotate(var(--ray-angle, 0deg)) scaleY(0.7); }
  50% { opacity: 1; transform: rotate(var(--ray-angle, 0deg)) scaleY(1.2); }
}

/* Sparkles */
.gift-anim-sparkle {
  position: absolute;
  width: var(--spark-size, 8px);
  height: var(--spark-size, 8px);
  background: var(--spark-color, #ffd700);
  border-radius: 50%;
  will-change: transform, opacity;
  animation: giftSparkle var(--spark-dur, 1s) ease-out forwards;
  animation-delay: var(--spark-delay, 0s);
  box-shadow: 0 0 6px var(--spark-color, #ffd700);
}

@keyframes giftSparkle {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--spark-dx, 50px), var(--spark-dy, -50px)) scale(0);
    opacity: 0;
  }
}

/* Konfetti */
.gift-anim-confetti {
  position: absolute;
  top: -10px;
  width: var(--conf-w, 8px);
  height: var(--conf-h, 12px);
  background: var(--conf-color, #ff0);
  will-change: transform, opacity;
  animation: giftConfettiFall var(--conf-dur, 3s) ease-in forwards;
  animation-delay: var(--conf-delay, 0s);
}

@keyframes giftConfettiFall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scaleX(1);
    opacity: 1;
  }
  25% {
    transform: translateY(25%) translateX(var(--conf-sway, 30px)) rotate(180deg) scaleX(0.5);
  }
  50% {
    transform: translateY(50%) translateX(calc(var(--conf-sway, 30px) * -0.5)) rotate(360deg) scaleX(1);
  }
  75% {
    transform: translateY(75%) translateX(var(--conf-sway, 30px)) rotate(540deg) scaleX(0.3);
    opacity: 0.7;
  }
  100% {
    transform: translateY(calc(100vh + 20px)) translateX(0) rotate(720deg) scaleX(0.8);
    opacity: 0;
  }
}

/* ============================================================
   8. TROPHY — Pokal mit Gold-Konfetti
   ============================================================ */
.gift-anim-trophy-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-anim-trophy-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 200, 0, 0.3) 0%, transparent 70%);
  animation: giftTrophyGlowPulse 1.5s ease-in-out infinite;
}

@keyframes giftTrophyGlowPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.gift-anim-trophy-emoji {
  font-size: 180px;
  will-change: transform, opacity;
  animation: giftTrophyEnter 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  filter: drop-shadow(0 0 30px rgba(255, 200, 0, 0.7));
  z-index: 2;
}

.gift-anim-trophy-emoji.exit {
  animation: giftThumbsExit 0.6s ease-in forwards;
}

@keyframes giftTrophyEnter {
  0% { transform: translateY(120%) scale(0.3); opacity: 0; }
  50% { transform: translateY(-10%) scale(1.15); opacity: 1; }
  70% { transform: translateY(5%) scale(0.95); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.gift-anim-trophy-spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--spark-size, 8px);
  height: var(--spark-size, 8px);
  background: var(--spark-color, #ffd700);
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
  animation: giftTrophySpark var(--spark-dur, 1s) ease-out forwards;
  animation-delay: var(--spark-delay, 0s);
  box-shadow: 0 0 8px var(--spark-color, #ffd700);
}

@keyframes giftTrophySpark {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--spark-dx, 50px), var(--spark-dy, -50px)) scale(0); opacity: 0; }
}

/* ============================================================
   9. DIAMOND — Diamant mit Prisma-Licht
   ============================================================ */
.gift-anim-diamond-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-anim-diamond-emoji {
  font-size: 160px;
  will-change: transform, opacity;
  animation: giftDiamondEnter 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: drop-shadow(0 0 40px rgba(100, 200, 255, 0.8));
  z-index: 2;
}

.gift-anim-diamond-emoji.exit {
  animation: giftDiamondExit 1s ease-in forwards;
}

@keyframes giftDiamondEnter {
  0% { transform: translateY(-120%) scale(0.3) rotate(-30deg); opacity: 0; }
  40% { opacity: 1; }
  60% { transform: translateY(5%) scale(1.1) rotate(5deg); }
  80% { transform: translateY(-3%) scale(0.95) rotate(-2deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

@keyframes giftDiamondExit {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2) rotate(15deg); opacity: 0; }
}

.gift-anim-diamond-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  transform: translate(-50%, -50%);
  animation: giftDiamondRaysSpin 8s linear infinite;
  opacity: 0;
  will-change: transform, opacity;
  animation: giftDiamondRaysSpin 8s linear infinite, giftDiamondRaysFade 3s ease-in forwards;
}

@keyframes giftDiamondRaysSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes giftDiamondRaysFade {
  0% { opacity: 0; }
  100% { opacity: 0.6; }
}

.gift-anim-diamond-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 120px;
  border-radius: 2px;
  will-change: opacity;
  animation: giftDiamondRayPulse 1.5s ease-in-out infinite alternate;
}

@keyframes giftDiamondRayPulse {
  0% { opacity: 0.2; height: 80px; }
  100% { opacity: 0.7; height: 140px; }
}

.gift-anim-diamond-refraction {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--ref-size, 10px);
  height: var(--ref-size, 10px);
  background: var(--ref-color, #00aaff);
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
  animation: giftDiamondRefract var(--ref-dur, 2s) ease-out forwards;
  animation-delay: var(--ref-delay, 1s);
  box-shadow: 0 0 10px var(--ref-color, #00aaff);
}

@keyframes giftDiamondRefract {
  0% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  50% { opacity: 0.6; }
  100% { transform: translate(var(--ref-dx, 80px), var(--ref-dy, -80px)) scale(0); opacity: 0; }
}

/* ============================================================
   10. ROCKET — Raketenstart + Feuerwerk
   ============================================================ */
.gift-anim-rocket-container {
  position: absolute;
  inset: 0;
}

.gift-anim-rocket-emoji {
  position: absolute;
  font-size: 80px;
  left: 50%;
  bottom: -100px;
  transform: translateX(-50%) rotate(-45deg);
  will-change: transform, opacity;
  animation: giftRocketLaunch 3.8s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  filter: drop-shadow(0 0 20px rgba(255, 120, 0, 0.8));
  z-index: 3;
}

@keyframes giftRocketLaunch {
  0% { bottom: -100px; opacity: 0; transform: translateX(-50%) rotate(-45deg); }
  10% { opacity: 1; }
  30% { bottom: 30%; transform: translateX(-50%) rotate(-45deg); }
  60% { bottom: 55%; transform: translateX(-40%) rotate(-50deg); }
  90% { bottom: 80%; transform: translateX(-50%) rotate(-45deg); }
  100% { bottom: 95%; opacity: 0; transform: translateX(-50%) rotate(-45deg) scale(0.5); }
}

.gift-anim-rocket-exhaust {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  animation: giftRocketExhaust var(--ex-dur, 0.8s) ease-out forwards;
  z-index: 1;
}

@keyframes giftRocketExhaust {
  0% { transform: translateX(-50%) translateY(0) scale(1); opacity: 0.9; }
  100% { transform: translateX(calc(-50% + var(--ex-dx, 0px))) translateY(80px) scale(0); opacity: 0; }
}

.gift-anim-rocket-firework {
  position: absolute;
  width: var(--fw-size, 6px);
  height: var(--fw-size, 6px);
  background: var(--fw-color, #ff0);
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
  animation: giftRocketFirework var(--fw-dur, 1.2s) ease-out forwards;
  animation-delay: var(--fw-delay, 0s);
  box-shadow: 0 0 6px var(--fw-color, #ff0);
}

@keyframes giftRocketFirework {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  30% { opacity: 1; }
  100% { transform: translate(var(--fw-dx, 50px), var(--fw-dy, -50px)) scale(0); opacity: 0; }
}

/* ============================================================
   11. CROWN — Krone schwebt herab
   ============================================================ */
.gift-anim-crown-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-anim-crown-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(128, 0, 200, 0.3) 0%, rgba(255, 200, 0, 0.1) 40%, transparent 70%);
  animation: giftCrownGlowPulse 2s ease-in-out infinite;
}

@keyframes giftCrownGlowPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

.gift-anim-crown-emoji {
  font-size: 180px;
  will-change: transform, opacity;
  animation: giftCrownDescend 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: drop-shadow(0 0 35px rgba(255, 200, 0, 0.8));
  z-index: 2;
}

.gift-anim-crown-emoji.exit {
  animation: giftCrownExit 1s ease-in forwards;
}

@keyframes giftCrownDescend {
  0% { transform: translateY(-150%) scale(0.4) rotate(-15deg); opacity: 0; }
  30% { opacity: 1; }
  70% { transform: translateY(5%) scale(1.05) rotate(3deg); }
  85% { transform: translateY(-2%) scale(0.97) rotate(-1deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

@keyframes giftCrownExit {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: translateY(-80%) scale(0.3); opacity: 0; }
}

.gift-anim-crown-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 350px;
  height: 350px;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: giftCrownRaysFade 2s ease-in 1s forwards;
}

@keyframes giftCrownRaysFade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.gift-anim-crown-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 90px;
  background: linear-gradient(to top, rgba(255, 200, 0, 0.7), transparent);
  border-radius: 2px;
  will-change: opacity;
  animation: giftCrownRayPulse 1.8s ease-in-out infinite alternate;
}

@keyframes giftCrownRayPulse {
  0% { opacity: 0.2; height: 60px; }
  100% { opacity: 0.8; height: 100px; }
}

.gift-anim-crown-jewel {
  position: absolute;
  left: var(--jewel-x, 50%);
  top: 50%;
  width: var(--jewel-size, 8px);
  height: var(--jewel-size, 8px);
  background: var(--jewel-color, #ffd700);
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
  animation: giftCrownJewel var(--jewel-dur, 3s) ease-in-out forwards;
  animation-delay: var(--jewel-delay, 1s);
  box-shadow: 0 0 8px var(--jewel-color, #ffd700);
}

@keyframes giftCrownJewel {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translateY(-80px) translateX(var(--jewel-drift, 20px)); opacity: 0; }
}

/* ============================================================
   12. SLOT — Spielautomat
   ============================================================ */
.gift-anim-slot-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-anim-slot-machine {
  width: min(280px, 60%);
  background: linear-gradient(145deg, #2a1050 0%, #1a0a30 100%);
  border: 3px solid #ffd700;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 0 40px rgba(255, 200, 0, 0.4), 0 8px 32px rgba(0,0,0,0.6);
  will-change: transform, opacity;
  animation: giftSlotEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  z-index: 2;
}

.gift-anim-slot-machine.jackpot {
  animation: giftSlotJackpot 0.3s ease-in-out 5;
  border-color: #ff0;
  box-shadow: 0 0 60px rgba(255, 255, 0, 0.6), 0 0 120px rgba(255, 200, 0, 0.3);
}

.gift-anim-slot-machine.exit {
  animation: giftSlotExit 0.6s ease-in forwards;
}

@keyframes giftSlotEnter {
  0% { transform: scale(0) rotate(-10deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes giftSlotJackpot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes giftSlotExit {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0) rotate(10deg); opacity: 0; }
}

.gift-anim-slot-header {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 200, 0, 0.6);
  margin-bottom: 12px;
  letter-spacing: 0.15em;
}

.gift-anim-slot-reels {
  display: flex;
  gap: 8px;
  justify-content: center;
  background: #000;
  border-radius: 10px;
  padding: 8px;
  overflow: hidden;
  height: 70px;
}

.gift-anim-slot-reel {
  width: 60px;
  height: 60px;
  overflow: hidden;
  background: #111;
  border-radius: 6px;
  border: 2px solid #333;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gift-anim-slot-sym {
  font-size: 36px;
  line-height: 60px;
  height: 60px;
  flex-shrink: 0;
  text-align: center;
}

.gift-anim-slot-sym.jackpot {
  animation: giftSlotJackpotSym 0.5s ease-in-out 3;
}

@keyframes giftSlotSpin {
  0% { transform: translateY(0); }
  100% { transform: translateY(-60px); }
}

@keyframes giftSlotJackpotSym {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.gift-anim-slot-coin {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: var(--coin-size, 14px);
  opacity: 0;
  will-change: transform, opacity;
  animation: giftSlotCoinBurst var(--coin-dur, 1.5s) ease-out forwards;
  animation-delay: var(--coin-delay, 0s);
  z-index: 3;
}

@keyframes giftSlotCoinBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  30% { opacity: 1; }
  100% { transform: translate(var(--coin-dx, 50px), var(--coin-dy, -80px)) scale(0.3); opacity: 0; }
}

/* Google Font loaded via @import at top of file */
