* { font-family: 'Fredoka', sans-serif; box-sizing: border-box; }

/* ── Animations ──────────────────────────────────── */
@keyframes coinBounce {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.12); }
}
@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-70px) scale(1.2); }
}
@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 0    rgba(251,191,36,0.5); }
  50%       { box-shadow: 0 0 0 18px rgba(251,191,36,0); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes milestoneGlow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Utilitaires ─────────────────────────────────── */
.coin-click { animation: coinBounce 0.15s ease-out; }
.float-text { animation: floatUp 0.8s ease-out forwards; pointer-events: none; }
.main-coin  { animation: pulseRing 2s infinite; transition: transform 0.1s; }

.shimmer-text {
  background: linear-gradient(90deg, #fbbf24, #fef3c7, #fbbf24);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}

/* ── Cartes améliorations ────────────────────────── */
.upgrade-card {
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.upgrade-card:hover:not(.cant-afford):not(.locked) {
  transform: translateY(-2px);
}
.upgrade-card:active:not(.cant-afford):not(.locked) {
  transform: scale(0.98);
}

/* Trop chère */
.cant-afford {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  filter: grayscale(30%);
}
.cant-afford:hover { transform: none !important; }

/* Verrouillée */
.locked {
  opacity: 0.2 !important;
  cursor: not-allowed !important;
  filter: grayscale(80%) brightness(0.5);
}
.locked:hover { transform: none !important; }

/* Milestone actif : CPS en surbrillance */
.milestone-active {
  color: #a78bfa !important;
  animation: milestoneGlow 2s ease-in-out infinite;
  font-weight: 700;
}

/* ── Rebirth button ──────────────────────────────── */
.rebirth-btn-ready {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  color: #fecaca;
  border-color: rgba(239,68,68,0.5);
  cursor: pointer;
  box-shadow: 0 0 16px rgba(239,68,68,0.25);
}
.rebirth-btn-ready:hover {
  background: linear-gradient(135deg, #991b1b, #b91c1c);
  box-shadow: 0 0 28px rgba(239,68,68,0.45);
  transform: translateY(-1px);
}
.rebirth-btn-locked {
  background: rgba(127,29,29,0.15);
  color: rgba(252,165,165,0.25);
  border-color: rgba(239,68,68,0.1);
  cursor: not-allowed;
}

/* ── Tooltip rebirth ─────────────────────────────── */
.rebirth-tooltip {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.tooltip-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ── Scrollbar ───────────────────────────────────── */
.scrollbar-thin::-webkit-scrollbar       { width: 5px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #4c1d95; border-radius: 3px; }