.word-cell.entry-error {
  color: #ff8787 !important;
  border-bottom-color: #ff5f65 !important;
  background: linear-gradient(180deg, transparent 70%, #ff4f5e22 70%);
  text-shadow: 0 0 12px #ff3d4f80;
  animation: entryErrorShake .28s ease;
}

@keyframes entryErrorShake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.coin-celebration {
  position: fixed;
  inset: 0;
  z-index: 2200;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 50% 44%, #ffd96b24, transparent 34%);
}

.coin-celebration i {
  position: absolute;
  left: var(--coin-x);
  top: -54px;
  font-style: normal;
  font-size: 28px;
  filter: drop-shadow(0 0 9px #ffc94f);
  animation: coinShower 1.55s cubic-bezier(.22,.7,.3,1) var(--coin-delay) forwards;
}

.coin-celebration.mega {
  z-index: 9999;
  background: radial-gradient(circle at 50% 43%, #ffe88c52, #e9a92820 28%, transparent 62%);
}

.coin-celebration.mega i {
  top: -88px;
  font-size: clamp(42px,5vw,72px);
  filter: drop-shadow(0 0 16px #ffe27a) drop-shadow(0 5px 10px #0009);
  animation-duration: 2.7s;
}

.coin-celebration.mega .coin-reward-burst {
  padding: 25px 46px;
  border-width: 4px;
  box-shadow: 0 0 45px #fff1a8,0 0 130px #ffb51ecc,0 18px 70px #000b;
  font-size: clamp(56px,10vw,118px);
  animation-duration: 2.65s;
}

.coin-reward-burst {
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translate(-50%,-50%);
  padding: 16px 28px;
  border: 2px solid #ffe59b;
  border-radius: 999px;
  background: linear-gradient(135deg,#8a5417,#e9ad35 48%,#75500f);
  box-shadow: 0 0 28px #ffd569, 0 0 80px #ffb51e66;
  color: #fff8d7;
  font-size: clamp(28px,5vw,52px);
  font-weight: 900;
  letter-spacing: .04em;
  text-shadow: 0 2px 0 #6d400c;
  animation: rewardBurst 1.45s ease forwards;
}

@keyframes coinShower {
  0% { transform: translate3d(0,-40px,0) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate3d(var(--coin-drift),110vh,0) rotate(var(--coin-spin)); opacity: .15; }
}

@keyframes rewardBurst {
  0% { transform: translate(-50%,-50%) scale(.25); opacity: 0; }
  20% { transform: translate(-50%,-50%) scale(1.16); opacity: 1; }
  35% { transform: translate(-50%,-50%) scale(1); }
  75% { opacity: 1; }
  100% { transform: translate(-50%,-60%) scale(1.06); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .coin-celebration i { display: none; }
  .coin-reward-burst, .word-cell.entry-error { animation: none; }
  .coin-celebration.mega i { display: block; animation: coinShower 2.7s cubic-bezier(.22,.7,.3,1) var(--coin-delay) forwards; }
  .coin-celebration.mega .coin-reward-burst { animation: rewardBurst 2.65s ease forwards; }
}
