button,
[role="button"] {
  cursor: pointer;
}

.hero-grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
}

.save-btn.save-pop {
  animation: save-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes save-pop {
  0% {
    transform: scale(1) rotate(0deg);
  }
  40% {
    transform: scale(1.15) rotate(8deg);
  }
  60% {
    transform: scale(0.95) rotate(-4deg);
  }
  80% {
    transform: scale(1.05) rotate(2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.save-confetti {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-fall 0.8s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(var(--fall-distance)) rotate(var(--rotation)) scale(0.5);
  }
}

.logo-wordmark {
  font-family: "Gabarito", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.quiz-card.correct {
  animation: quiz-success-pulse 0.4s ease-out;
  border-color: #10b981;
}

.quiz-card.incorrect {
  animation: quiz-shake 0.4s ease-out;
  border-color: #ef4444;
}

@keyframes quiz-success-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.quiz-success-check,
.quiz-error-x {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-success-check {
  background: #10b981;
  animation: quiz-pop-in 0.3s ease-out;
}

.quiz-error-x {
  background: #ef4444;
  animation: quiz-shake 0.4s ease-out;
}

@keyframes quiz-pop-in {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes quiz-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-4px);
  }
  40%,
  80% {
    transform: translateX(4px);
  }
}

.quiz-confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  top: -10px;
  opacity: 0;
  border-radius: 2px;
  animation: quiz-confetti-fall 2.5s ease-out forwards;
}

@keyframes quiz-confetti-fall {
  0% {
    top: -10px;
    opacity: 1;
    transform: rotate(0deg);
  }
  100% {
    top: 100%;
    opacity: 0;
    transform: rotate(720deg);
  }
}

.deck-card {
  position: relative;
}

.deck-card::before,
.deck-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  z-index: -1;
}

.deck-card::before {
  transform: translate(4px, 4px) rotate(0.6deg);
}

.deck-card::after {
  transform: translate(8px, 8px) rotate(1.2deg);
  opacity: 0.6;
}

.quiz-shake-anim {
  animation: quiz-shake 0.4s ease-out;
}

.word-collected-fly {
  opacity: 0;
  animation: word-collected-fly 0.55s ease-out forwards;
}

@keyframes word-collected-fly {
  0% {
    transform: translateY(14px) scale(0.96);
    opacity: 0;
  }
  58% {
    transform: translateY(-3px) scale(1.015);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.badge-pop {
  animation: badge-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s backwards;
}

@keyframes badge-pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.12);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

