/* Emoji Craft: Infinite Fusion - Custom Styling & Juice Animations */

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

@keyframes shakeFail {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px) rotate(-4deg); }
  40%, 80% { transform: translateX(8px) rotate(4deg); }
}

@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-4px, 3px) rotate(-0.5deg); }
  30% { transform: translate(4px, -3px) rotate(0.5deg); }
  45% { transform: translate(-3px, -2px); }
  60% { transform: translate(3px, 2px); }
  75% { transform: translate(-1px, 1px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes jellyWobble {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.25, 0.75); }
  40% { transform: scale(0.75, 1.25); }
  50% { transform: scale(1.15, 0.85); }
  65% { transform: scale(0.95, 1.05); }
  75% { transform: scale(1.05, 0.95); }
  100% { transform: scale(1, 1); }
}

@keyframes magneticPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.6), inset 0 0 10px rgba(245, 158, 11, 0.3);
    border-color: rgba(251, 191, 36, 0.9);
  }
  50% {
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.8), inset 0 0 15px rgba(56, 189, 248, 0.4);
    border-color: rgba(56, 189, 248, 1);
  }
}

.scale-in {
  animation: scaleIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.shake-fail {
  animation: shakeFail 0.4s ease-in-out forwards;
}

.screen-shake {
  animation: screenShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.jelly-bounce {
  animation: jellyWobble 0.6s ease-in-out both;
}

.magnetic-glow {
  animation: magneticPulse 0.8s ease-in-out infinite !important;
  transform: scale(1.12);
}

.float-anim {
  animation: floatSlow 3s ease-in-out infinite;
}

/* 隐藏细滚动条 */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.6);
}

#crafting-board {
  touch-action: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
}

.board-item {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s, border-color 0.2s;
}
