.tickets-animation-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  perspective: 1200px;
  overflow: hidden;
}

.itbags-ticket-wrap {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--ticket-width, 112px);
  aspect-ratio: 1541.34 / 722;
  transform-origin: center;
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
  opacity: 0;
  filter: drop-shadow(0 20px 24px rgba(0, 0, 0, .26)) drop-shadow(0 0 16px rgba(201, 150, 26, .18));
}

.itbags-ticket-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: itbags-ticket-air-drift var(--spin-speed, 1900ms) cubic-bezier(.36,.05,.28,1) infinite alternate;
}

.itbags-ticket-face,
.itbags-ticket-edge {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.itbags-ticket-face {
  transform: translateZ(3px);
  filter: drop-shadow(0 1px 1px rgba(72, 45, 0, .18));
}

.itbags-ticket-edge {
  opacity: .56;
  filter: saturate(1.12) brightness(.74);
}

.itbags-ticket-edge-1 {
  transform: translateZ(1.8px) translate(1.5px, 1px) scale(.997);
}

.itbags-ticket-edge-2 {
  transform: translateZ(.4px) translate(3px, 2px) scale(.994);
  opacity: .42;
}

.itbags-ticket-edge-3 {
  transform: translateZ(-1px) translate(4.5px, 3px) scale(.991);
  opacity: .28;
}

.itbags-flying-star {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--star-size, 12px);
  height: auto;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity, filter;
  filter: drop-shadow(0 0 10px rgba(216, 179, 98, .42));
}

.itbags-ticket-burst {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.itbags-ticket-burst-ring {
  position: absolute;
  left: -22px;
  top: -22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 239, 166, .95);
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(201, 150, 26, .52), inset 0 0 18px rgba(201, 150, 26, .22);
  animation: itbags-ticket-burst-ring 760ms cubic-bezier(.12,.74,.21,1) forwards;
}

.itbags-ticket-burst-core {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fff5b8;
  box-shadow: 0 0 20px 9px rgba(201, 150, 26, .7);
  animation: itbags-ticket-burst-core 520ms ease-out forwards;
}

.itbags-ticket-burst-ray {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--ray-width, 34px);
  height: 1px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 247, 184, 1), rgba(201, 150, 26, .16), transparent);
  animation: itbags-ticket-burst-ray 720ms cubic-bezier(.12,.74,.21,1) forwards;
}

.itbags-ticket-spark {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #fff7b8;
  box-shadow: 0 0 14px 6px rgba(201, 150, 26, .62);
  pointer-events: none;
  animation: itbags-ticket-spark-out 540ms ease-out forwards;
}

@keyframes itbags-ticket-air-drift {
  0% {
    transform: rotateX(var(--rot-x-start, 16deg)) rotateY(var(--rot-y-start, -28deg)) rotateZ(var(--rot-z-start, 0deg));
  }

  48% {
    transform: rotateX(var(--rot-x-mid, -22deg)) rotateY(var(--rot-y-mid, -58deg)) rotateZ(var(--rot-z-mid, 190deg));
  }

  100% {
    transform: rotateX(var(--rot-x-end, 18deg)) rotateY(var(--rot-y-end, -46deg)) rotateZ(var(--rot-z-end, 390deg));
  }
}

@keyframes itbags-ticket-burst-ring {
  0% {
    opacity: .95;
    transform: scale(.25);
  }

  100% {
    opacity: 0;
    transform: scale(2.85);
  }
}

@keyframes itbags-ticket-burst-core {
  to {
    opacity: 0;
    transform: scale(2.2);
  }
}

@keyframes itbags-ticket-burst-ray {
  0% {
    opacity: .95;
    transform: rotate(var(--angle)) translateX(0) scaleX(.16);
  }

  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(18px) scaleX(1);
  }
}

@keyframes itbags-ticket-spark-out {
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .itbags-ticket-card {
    animation-duration: 1ms;
  }
}
