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

.hero-shimmer {
  background-image: linear-gradient(
    100deg,
    #9a3412 0%,
    #c2410c 18%,
    #d97706 36%,
    #be123c 58%,
    #c2410c 80%,
    #9a3412 100%
  );
  background-size: 300% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hero-shimmer 16s linear infinite;
}

@keyframes hero-shimmer {
  to {
    background-position: 150% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-shimmer {
    animation: none;
  }
}

.dotted-rule {
  height: 3px;
  background-image: radial-gradient(circle at center, #cbd5e1 1.4px, transparent 1.5px);
  background-size: 10px 3px;
  background-repeat: repeat-x;
}

[data-list-editorial] > [data-editorial-prose]:first-child > p:first-of-type::first-letter {
  float: left;
  margin: 0.08em 0.4rem 0 0;
  color: #0f172a;
  font-family: "Lora", Georgia, serif;
  font-size: 4rem;
  font-weight: 700;
  line-height: 0.75;
  position: relative;
  top: 0.08em;
}

@supports (initial-letter: 2) {
  [data-list-editorial] > [data-editorial-prose]:first-child > p:first-of-type::first-letter {
    float: none;
    margin: 0 0.4rem 0 0;
    font-size: inherit;
    line-height: inherit;
    initial-letter: 2;
    position: static;
  }
}

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

.drill-land {
  animation: drill-land 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.35);
}

@keyframes drill-land {
  0% {
    transform: translateY(-16px) scale(0.94);
    opacity: 0.35;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.quiz-card.correct {
  animation: quiz-success-pulse 0.4s ease-out;
  box-shadow: 2px 2px 0 0 rgba(110, 231, 183, 0.55);
}

.quiz-card.incorrect {
  animation: quiz-shake 0.4s ease-out;
  box-shadow: 2px 2px 0 0 rgba(252, 165, 165, 0.55);
}

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