@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;
}

.gift-anim-overlay--fixed {
  position: fixed;
  z-index: 9998;
}

.gift-anim-overlay--cinematic {
  z-index: 9992;
  background: transparent;
}

.gift-anim-overlay--tt {
  z-index: 9994;
  background: transparent;
}

.gift-anim-overlay--tt[data-gift-tier="legend"] {
  z-index: 9996;
}

.wb-gift-live-stack {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 10020;
  width: min(360px, 78vw);
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
  contain: layout style;
}

.wb-gift-toast {
  min-height: 46px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(7,10,18,.86), rgba(10,15,28,.68));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08);
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: 0;
  transform: translateX(-16px) scale(.96);
  transition: opacity .22s ease, transform .22s cubic-bezier(.16,1,.3,1), filter .22s ease;
  backdrop-filter: blur(14px);
}

.wb-gift-toast.is-in {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.wb-gift-toast.is-out {
  opacity: 0;
  transform: translateX(-18px) scale(.98);
  filter: blur(2px);
}

.wb-gift-toast.is-premium {
  background: linear-gradient(90deg, rgba(15,23,42,.92), rgba(30,41,59,.74));
  border-color: rgba(250,204,21,.28);
  box-shadow: 0 12px 34px rgba(0,0,0,.32), 0 0 26px rgba(250,204,21,.12), inset 0 1px 0 rgba(255,255,255,.1);
}

.wb-gift-toast-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #06b6d4, #f43f5e);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 0 0 2px rgba(255,255,255,.06);
}

.wb-gift-toast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wb-gift-toast-copy {
  min-width: 0;
  line-height: 1.08;
}

.wb-gift-toast-sender {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 950;
}

.wb-gift-toast-gift {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,255,255,.72);
}

.wb-gift-toast-badge {
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 30px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
}

.wb-gift-toast-icon {
  font-size: 19px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.32));
}

.wb-gift-toast-price {
  font-size: 9px;
  font-weight: 950;
  color: #fef3c7;
}

.wb-gift-toast-combo {
  min-width: 34px;
  color: #00e5ff;
  font-size: 20px;
  font-weight: 950;
  text-shadow: 0 0 14px rgba(0,229,255,.72), 0 2px 8px rgba(0,0,0,.8);
  animation: wbGiftComboPop .34s cubic-bezier(.16,1,.3,1) both;
}

.gift-anim-tt-card {
  position: absolute;
  left: 50%;
  bottom: max(9.5vh, 88px);
  width: min(430px, calc(100vw - 28px));
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(4,7,14,.78), rgba(15,23,42,.54));
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 12px 38px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
  transform: translateX(-50%) translateY(20px) scale(.96);
  opacity: 0;
  pointer-events: none;
  animation: wbGiftTtCardIn .28s cubic-bezier(.16,1,.3,1) forwards, wbGiftTtCardOut .34s ease 2.85s forwards;
}

.gift-anim-tt-card.is-premium {
  background: linear-gradient(90deg, rgba(9,14,28,.86), rgba(38,28,58,.58));
  border-color: rgba(250,204,21,.24);
  box-shadow: 0 16px 48px rgba(0,0,0,.36), 0 0 30px rgba(56,189,248,.12), inset 0 1px 0 rgba(255,255,255,.1);
  animation: wbGiftTtCardIn .28s cubic-bezier(.16,1,.3,1) forwards, wbGiftTtCardOut .34s ease 3.7s forwards;
}

.gift-anim-tt-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #38bdf8, #fb7185);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.gift-anim-tt-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-anim-tt-copy {
  min-width: 0;
}

.gift-anim-tt-sender,
.gift-anim-tt-gift {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-anim-tt-sender {
  font-size: 13px;
  font-weight: 950;
  line-height: 1.05;
}

.gift-anim-tt-gift {
  margin-top: 3px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 800;
}

.gift-anim-tt-icon {
  font-size: 29px;
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(255,255,255,.35));
  animation: wbGiftIconPulse .9s ease-in-out infinite;
}

.gift-anim-tt-amount {
  min-width: 42px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(250,204,21,.12);
  border: 1px solid rgba(250,204,21,.24);
  font-size: 10px;
  font-weight: 950;
}

.gift-anim-tt-combo-card {
  min-width: 42px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgba(0,229,255,.24), rgba(250,204,21,.2));
  border: 1px solid rgba(255,255,255,.2);
  font-size: 16px;
  font-weight: 950;
  text-shadow: 0 0 14px rgba(0,229,255,.78), 0 2px 8px rgba(0,0,0,.7);
  animation: wbGiftComboPop .34s cubic-bezier(.16,1,.3,1) both;
}

.gift-item,
.gift-item-btn,
.gift-card,
.wb-ct-gift {
  position: relative;
  overflow: hidden;
}

.gift-item::before,
.gift-item-btn::before,
.gift-card::before,
.wb-ct-gift::before {
  content: '';
  position: absolute;
  inset: -40%;
  opacity: 0;
  background: conic-gradient(from 120deg, transparent, rgba(56,189,248,.26), transparent, rgba(250,204,21,.22), transparent);
  animation: wbGiftPreviewSweep 3.8s linear infinite;
  pointer-events: none;
}

.gift-item[data-gift-tier="premium"]::before,
.gift-item[data-gift-tier="legend"]::before,
.gift-item[data-gift-tier="mythic"]::before,
.gift-item-btn[data-gift-tier="premium"]::before,
.gift-item-btn[data-gift-tier="legend"]::before,
.gift-item-btn[data-gift-tier="mythic"]::before,
.gift-card[data-gift-tier="premium"]::before,
.gift-card[data-gift-tier="legend"]::before,
.gift-card[data-gift-tier="mythic"]::before,
.wb-ct-gift[data-gift-tier="premium"]::before,
.wb-ct-gift[data-gift-tier="legend"]::before,
.wb-ct-gift[data-gift-tier="mythic"]::before {
  opacity: .55;
}

.gift-item[data-gift-tier="legend"],
.gift-item-btn[data-gift-tier="legend"],
.gift-card[data-gift-tier="legend"],
.wb-ct-gift[data-gift-tier="legend"] {
  border-color: rgba(250,204,21,.44) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 20px rgba(250,204,21,.12);
}

.gift-item[data-gift-tier="mythic"],
.gift-item-btn[data-gift-tier="mythic"],
.gift-card[data-gift-tier="mythic"],
.wb-ct-gift[data-gift-tier="mythic"] {
  border-color: rgba(56,189,248,.5) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 26px rgba(56,189,248,.18), 0 0 34px rgba(168,85,247,.12);
}

.wb-gift-preview {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  margin: 0 auto 3px;
  isolation: isolate;
}

.wb-gift-preview-icon {
  position: relative;
  z-index: 2;
  display: inline-block;
  line-height: 1;
  transform-origin: 50% 58%;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.28));
  animation: wbGiftPreviewFloat 2.2s ease-in-out infinite;
}

.wb-gift-preview[data-gift-tier="premium"] .wb-gift-preview-icon,
.wb-gift-preview[data-gift-tier="legend"] .wb-gift-preview-icon,
.wb-gift-preview[data-gift-tier="mythic"] .wb-gift-preview-icon {
  animation: wbGiftPreviewFloat 1.8s ease-in-out infinite, wbGiftPreviewPulse 1.05s ease-in-out infinite;
}

.gift-preview-ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background: radial-gradient(circle, rgba(255,255,255,.1), rgba(255,255,255,0) 62%);
  animation: wbGiftPreviewRing 2.8s ease-in-out infinite;
}

.wb-gift-preview[data-gift-tier="legend"] .gift-preview-ring,
.wb-gift-preview[data-gift-tier="mythic"] .gift-preview-ring {
  border-color: rgba(250,204,21,.46);
  box-shadow: 0 0 18px rgba(250,204,21,.2), inset 0 0 16px rgba(56,189,248,.12);
}

.gift-preview-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px currentColor;
  color: #38bdf8;
  opacity: .84;
  animation: wbGiftPreviewSpark 1.9s ease-in-out infinite;
}

.gift-preview-spark.s1 { top: 5px; right: 7px; animation-delay: 0s; }
.gift-preview-spark.s2 { left: 6px; bottom: 10px; color: #facc15; animation-delay: .32s; }
.gift-preview-spark.s3 { right: 9px; bottom: 6px; color: #fb7185; animation-delay: .62s; }

@keyframes wbGiftPreviewFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg) scale(1); }
  50% { transform: translateY(-4px) rotate(3deg) scale(1.08); }
}

@keyframes wbGiftPreviewPulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255,255,255,.34)); }
  50% { filter: drop-shadow(0 0 18px rgba(56,189,248,.72)); }
}

@keyframes wbGiftPreviewRing {
  0%, 100% { transform: scale(.86) rotate(0deg); opacity: .54; }
  50% { transform: scale(1.08) rotate(90deg); opacity: 1; }
}

@keyframes wbGiftPreviewSpark {
  0%, 100% { transform: translate3d(0,0,0) scale(.62); opacity: .35; }
  50% { transform: translate3d(3px,-5px,0) scale(1.22); opacity: 1; }
}

@keyframes wbGiftPreviewSweep {
  to { transform: rotate(360deg); }
}

@keyframes wbGiftComboPop {
  from { opacity: 0; transform: translateY(6px) scale(.72) rotate(-5deg); }
  to   { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

@keyframes wbGiftTtCardIn {
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes wbGiftTtCardOut {
  to { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.98); filter: blur(2px); }
}

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

@media (max-width: 680px) {
  .wb-gift-live-stack {
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: min(330px, 82vw);
  }

  .gift-anim-tt-card {
    bottom: max(8.5vh, 78px);
    grid-template-columns: 38px minmax(0, 1fr) auto;
    min-height: 54px;
    gap: 8px;
  }

  .gift-anim-tt-avatar {
    width: 38px;
    height: 38px;
  }

  .gift-anim-tt-amount {
    display: none;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .wb-gift-live-stack {
    left: max(10px, env(safe-area-inset-left));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(310px, 42vw);
  }

  .gift-anim-tt-card {
    bottom: max(18px, env(safe-area-inset-bottom));
    width: min(390px, 56vw);
  }
}

.gift-anim-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.gift-anim-stage-label {
  position: absolute;
  left: 50%;
  bottom: max(7.5vh, 72px);
  width: min(86vw, 520px);
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-shadow: 0 2px 18px rgba(0,0,0,.8), 0 0 36px rgba(0,147,255,.32);
  animation: giftStageLabelIn .36s cubic-bezier(.16,1,.3,1) both;
}

.gift-anim-stage-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(3,7,18,.54);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,.78);
  font-size: clamp(10px, 1.8vw, 12px);
  font-weight: 900;
  letter-spacing: .12em;
}

.gift-anim-stage-title {
  margin-top: 9px;
  font-size: clamp(30px, 8vw, 72px);
  line-height: .92;
  font-weight: 950;
  letter-spacing: 0;
}

.gift-anim-stage-sub {
  margin-top: 8px;
  font-size: clamp(12px, 2.4vw, 15px);
  font-weight: 800;
  color: rgba(255,255,255,.82);
}

.gift-anim-stage-loot {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.gift-anim-stage-loot span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,.72);
  border: 1px solid rgba(250,204,21,.34);
  color: #fef3c7;
  font-size: clamp(11px, 2vw, 13px);
  font-weight: 850;
  box-shadow: 0 0 18px rgba(250,204,21,.16);
}

.gift-anim-stage--socialism .gift-anim-stage-title {
  color: #fff7ed;
  text-shadow: 0 0 20px rgba(239,68,68,.85), 0 0 54px rgba(250,204,21,.42), 0 2px 14px rgba(0,0,0,.9);
}

.gift-anim-stage--socialism .gift-anim-stage-kicker {
  border-color: rgba(250,204,21,.44);
  color: #fef3c7;
  background: rgba(127,29,29,.46);
}

.gift-anim-stage--chest .gift-anim-stage-title {
  color: #fef3c7;
  text-shadow: 0 0 20px rgba(250,204,21,.76), 0 0 48px rgba(56,189,248,.28), 0 2px 16px rgba(0,0,0,.9);
}

.gift-anim-stage--universe .gift-anim-stage-title {
  color: #f8fafc;
  text-shadow: 0 0 18px rgba(56,189,248,.92), 0 0 54px rgba(168,85,247,.62), 0 2px 16px rgba(0,0,0,.9);
}

.gift-anim-stage--universe .gift-anim-stage-kicker {
  border-color: rgba(125,211,252,.48);
  color: #e0f2fe;
  background: rgba(30,41,59,.5);
}

.gift-anim-stage--dragon .gift-anim-stage-title {
  color: #fff7ed;
  text-shadow: 0 0 18px rgba(249,115,22,.95), 0 0 56px rgba(239,68,68,.52), 0 2px 16px rgba(0,0,0,.9);
}

.gift-anim-stage--dragon .gift-anim-stage-kicker {
  border-color: rgba(251,146,60,.5);
  color: #fed7aa;
  background: rgba(127,29,29,.46);
}

.gift-anim-stage--basilisk .gift-anim-stage-title {
  color: #ecfccb;
  text-shadow: 0 0 18px rgba(34,197,94,.94), 0 0 52px rgba(132,204,22,.48), 0 2px 16px rgba(0,0,0,.9);
}

.gift-anim-stage--basilisk .gift-anim-stage-kicker {
  border-color: rgba(134,239,172,.44);
  color: #dcfce7;
  background: rgba(6,78,59,.48);
}

@keyframes giftStageLabelIn {
  from { opacity: 0; transform: translateX(-50%) translateY(22px) scale(.96); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@media (max-width: 680px) {
  .gift-anim-stage-label {
    bottom: max(8vh, 84px);
    width: min(92vw, 440px);
  }

  .gift-anim-stage-title {
    font-size: clamp(26px, 11vw, 48px);
  }
}

/* ============================================================
   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 */

/* ============================================================
   WAVEBLUE 2099 — TikTok-Style Gift Overlay Engine
   Galaxy · Emotion · Universe · 2099
   ============================================================ */

/* ── Haupt-Overlay (TikTok-Style, groß, auf dem Video) ─────── */
.gift-2099-overlay {
  position: fixed;
  bottom: 120px;
  left: 20px;
  z-index: 9800;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: gift2099Enter 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.gift-2099-overlay.leaving {
  animation: gift2099Leave 0.5s ease-in forwards;
}
@keyframes gift2099Enter {
  from { transform: scale(0) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);  opacity: 1; }
}
@keyframes gift2099Leave {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(0) translateY(-40px); opacity: 0; }
}

.gift-2099-emoji {
  font-size: 110px;
  line-height: 1;
  filter: drop-shadow(0 0 20px rgba(0,147,255,0.6));
  will-change: transform;
}
.gift-2099-name {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 0 10px rgba(0,147,255,0.8);
  background: rgba(0,0,0,0.5);
  border-radius: 20px;
  padding: 2px 10px;
}
.gift-2099-sender {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}
.gift-2099-combo {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 15px #0093FF, 0 2px 4px rgba(0,0,0,0.8);
  animation: comboCount2099 0.2s ease-out;
}
@keyframes comboCount2099 {
  0%   { transform: scale(1.8); }
  100% { transform: scale(1); }
}

/* ── Galaxy Animations ─────────────────────────────────────── */
.gift-anim-galaxy .gift-2099-emoji {
  animation: galaxyFloat 3s ease-in-out infinite, galaxyGlow 2s ease-in-out infinite;
  filter: drop-shadow(0 0 30px #AA44FF) drop-shadow(0 0 60px #0093FF);
}
@keyframes galaxyFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  25%     { transform: translateY(-15px) rotate(5deg); }
  75%     { transform: translateY(-8px) rotate(-3deg); }
}
@keyframes galaxyGlow {
  0%,100% { filter: drop-shadow(0 0 20px #AA44FF) drop-shadow(0 0 40px #0093FF); }
  50%     { filter: drop-shadow(0 0 50px #AA44FF) drop-shadow(0 0 80px #00C2FF) brightness(1.3); }
}

/* ── Planet Orbit ───────────────────────────────────────────── */
.gift-anim-planet .gift-2099-emoji {
  animation: planetOrbit 4s linear infinite;
  filter: drop-shadow(0 0 25px #00C851);
}
@keyframes planetOrbit {
  0%,100% { transform: translateX(0) scale(1); }
  25%     { transform: translateX(15px) scale(1.05); }
  50%     { transform: translateX(0) scale(0.95); }
  75%     { transform: translateX(-15px) scale(1.05); }
}

/* ── Supernova ──────────────────────────────────────────────── */
.gift-anim-supernova .gift-2099-emoji {
  animation: supernovaExplode 0.6s cubic-bezier(0.34,1.56,0.64,1),
             supernovaPulse 1.5s ease-in-out 0.6s infinite;
  filter: drop-shadow(0 0 40px #FFD700) drop-shadow(0 0 80px #FF6B35);
}
@keyframes supernovaExplode {
  0%   { transform: scale(0); filter: brightness(5); }
  50%  { transform: scale(1.8); filter: brightness(3); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes supernovaPulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.15); }
}

/* ── Black Hole ─────────────────────────────────────────────── */
.gift-anim-blackhole .gift-2099-emoji {
  animation: blackHoleSpin 3s linear infinite, blackHolePull 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 30px #1a0033) drop-shadow(0 0 60px #6600CC);
}
@keyframes blackHoleSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes blackHolePull {
  0%,100% { transform: scale(1) rotate(0deg); }
  50%     { transform: scale(1.2) rotate(180deg); }
}

/* ── Comet ──────────────────────────────────────────────────── */
.gift-anim-comet .gift-2099-emoji {
  animation: cometFly 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px #00C2FF);
}
@keyframes cometFly {
  0%   { transform: translateX(-20px) translateY(10px) rotate(-30deg); }
  50%  { transform: translateX(10px) translateY(-10px) rotate(-20deg); }
  100% { transform: translateX(-20px) translateY(10px) rotate(-30deg); }
}

/* ── Emotion: Love ──────────────────────────────────────────── */
.gift-anim-love .gift-2099-emoji {
  animation: lovePulse 1s ease-in-out infinite;
  filter: drop-shadow(0 0 30px #FF4081);
}
@keyframes lovePulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.15); filter: drop-shadow(0 0 50px #FF4081) brightness(1.2); }
}

/* ── Emotion: Heartbreak ────────────────────────────────────── */
.gift-anim-heartbreak .gift-2099-emoji {
  animation: heartbreakShake 0.5s ease-in-out infinite;
  filter: drop-shadow(0 0 20px #FF4444);
}
@keyframes heartbreakShake {
  0%,100% { transform: rotate(0deg) scale(1); }
  25%     { transform: rotate(-5deg) scale(1.05); }
  75%     { transform: rotate(5deg) scale(0.95); }
}

/* ── Emotion: Hope ──────────────────────────────────────────── */
.gift-anim-hope .gift-2099-emoji {
  animation: hopeRise 2s ease-in-out infinite;
  filter: drop-shadow(0 0 30px #FFD700);
}
@keyframes hopeRise {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-20px) scale(1.1); filter: drop-shadow(0 0 50px #FFD700) brightness(1.3); }
}

/* ── Humor ──────────────────────────────────────────────────── */
.gift-anim-humor .gift-2099-emoji {
  animation: humorWobble 0.5s ease-in-out infinite;
}
@keyframes humorWobble {
  0%,100% { transform: rotate(-10deg) scale(1); }
  50%     { transform: rotate(10deg) scale(1.1); }
}

/* ── Spiritual ──────────────────────────────────────────────── */
.gift-anim-spiritual .gift-2099-emoji {
  animation: spiritualSpin 4s linear infinite;
  filter: drop-shadow(0 0 25px #9B59B6);
}
@keyframes spiritualSpin {
  from { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.1); }
  to   { transform: rotate(360deg) scale(1); }
}

/* ── Luxury (Bounce + Shimmer) ─────────────────────────────── */
.gift-anim-luxury .gift-2099-emoji {
  animation: luxuryBounce 1.5s cubic-bezier(0.34,1.56,0.64,1) infinite;
  filter: drop-shadow(0 0 30px #FFD700);
}
@keyframes luxuryBounce {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-20px) scale(1.1); filter: drop-shadow(0 0 50px #FFD700) brightness(1.4); }
}

/* ── Universums-Explosion (MEGA Gift) ──────────────────────── */
.gift-2099-universe-explosion {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, #1a0066 0%, #000428 40%, #000010 100%);
  z-index: 9900;
  animation: universeExplode 4s ease forwards;
  pointer-events: none;
}
@keyframes universeExplode {
  0%   { opacity: 0; transform: scale(0); }
  10%  { opacity: 1; transform: scale(1); }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}
.gift-2099-universe-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: starTwinkle var(--dur) ease-in-out var(--delay) infinite;
}
@keyframes starTwinkle {
  0%,100% { opacity: 0.3; transform: scale(1); }
  50%     { opacity: 1; transform: scale(1.5); }
}
.gift-2099-universe-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  animation: universeTextAppear 1s 0.5s ease-out forwards;
  opacity: 0;
  text-align: center;
}
@keyframes universeTextAppear {
  from { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  to   { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}

/* ── Gift Picker 2099 Tabs ──────────────────────────────────── */
.gift-tab-2099 {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: rgba(255,255,255,0.6);
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.gift-tab-2099.active {
  background: rgba(0,147,255,0.25);
  border-color: #0093FF;
  color: #fff;
  font-weight: 700;
}
.gift-tab-2099:hover:not(.active) {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ── Emotion Engine Panel ───────────────────────────────────── */
#emotion-engine-panel {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #0A0E1A, #1A2035);
  border: 1px solid rgba(0,147,255,0.3);
  border-radius: 20px;
  padding: 20px;
  width: 320px;
  z-index: 9000;
  display: none;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(0,147,255,0.1);
}
.emotion-step {
  margin-bottom: 14px;
}
.emotion-step-label {
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.emotion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.emotion-chip {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.2s;
}
.emotion-chip:hover, .emotion-chip.selected {
  background: rgba(0,147,255,0.2);
  border-color: #0093FF;
  color: #fff;
}
.emotion-result {
  background: linear-gradient(135deg, rgba(0,147,255,0.15), rgba(170,68,255,0.15));
  border-radius: 14px;
  padding: 14px;
  margin-top: 14px;
  border: 1px solid rgba(0,147,255,0.2);
  display: none;
}
