/* ─── Toast notifications + Trophy celebration ───────────────── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast-container .toast {
  position: static;
  background: var(--white);
  color: var(--dark);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: 0 8px 24px rgba(0, 142, 168, 0.2);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: var(--text-sm);
  animation: toastIn 0.3s ease;
  min-width: 220px;
  max-width: 320px;
}

.toast-container .toast.toast-xp { border-left-color: #f1c40f; }
.toast-container .toast.toast-error { border-left-color: #e74c3c; color: #c0392b; }
.toast-container .toast.toast-undo { border-left-color: var(--warning, #f59e0b); }
.toast-container .toast.toast-undo .toast-undo-btn {
  background: none; border: none; color: var(--primary, #008ea8); cursor: pointer;
  font-weight: 700; font-size: var(--text-sm, .875rem); text-decoration: underline;
  padding: 0; margin-left: 8px; white-space: nowrap;
}
.toast-container .toast.toast-undo .toast-undo-timer {
  width: 100%; height: 3px; background: var(--gray-light, #ecf0f1);
  border-radius: 2px; margin-top: 6px; overflow: hidden;
}
.toast-container .toast.toast-undo .toast-undo-timer-bar {
  height: 100%; background: var(--warning, #f59e0b);
  animation: undoCountdown 10s linear forwards;
}
@keyframes undoCountdown { from { width: 100%; } to { width: 0%; } }
.toast-container .toast.toast-out { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes toastOut {
  to { transform: translateX(120%); opacity: 0; }
}

/* ── Trophy celebration modal ── */
.trophy-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  padding: 1rem;
}

.confetti-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.trophy-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  max-width: 400px;
  animation: trophyPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}

@keyframes trophyPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.trophy-icon-big {
  font-size: 5rem;
  animation: trophyGlow 1.5s ease infinite alternate;
}

@keyframes trophyGlow {
  from { filter: drop-shadow(0 0 8px rgba(241, 196, 15, 0.4)); }
  to   { filter: drop-shadow(0 0 24px rgba(241, 196, 15, 0.8)); }
}

.trophy-title {
  font-family: var(--font-display);
  color: var(--primary);
  margin: 16px 0 8px;
}

.trophy-name {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--dark);
}

.trophy-desc {
  color: var(--gray-dark);
  margin-bottom: 24px;
  font-size: var(--text-sm);
}
