.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1001;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay.visible { opacity: 1; }

.completion-modal {
  position: relative;
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  padding: 36px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  overflow: hidden;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.completion-modal.visible { transform: scale(1); opacity: 1; }

.completion-modal.boss-completion {
  border-color: var(--modal-accent, #FBBF24);
  box-shadow: 0 0 40px var(--modal-accent, rgba(251,191,36,0.3));
}

.modal-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  position: relative;
}

.boss-defeat-name {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--modal-accent, #FBBF24);
  font-weight: 600;
  margin-bottom: 8px;
  position: relative;
}

.stars-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 16px;
  position: relative;
}

.star {
  font-size: 36px;
  color: rgba(255,255,255,0.15);
  animation: starPop 0.4s ease both;
  filter: grayscale(1);
}
.star.filled {
  color: #FBBF24;
  filter: grayscale(0) drop-shadow(0 0 12px rgba(251,191,36,0.6));
}
@keyframes starPop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ── Bonus Pills ─────────────────────────────────────── */
.completion-bonuses {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  position: relative;
}
.bonus-pill {
  padding: 6px 14px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  animation: bonusPillIn 0.4s ease both;
}
.bonus-pill:nth-child(1) { animation-delay: 0.8s; }
.bonus-pill:nth-child(2) { animation-delay: 1.0s; }
.bonus-pill:nth-child(3) { animation-delay: 1.2s; }
@keyframes bonusPillIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.streak-pill { background: rgba(249,115,22,0.2); color: #FB923C; border: 1px solid rgba(249,115,22,0.3); }
.daily-pill { background: rgba(16,185,129,0.2); color: #34D399; border: 1px solid rgba(16,185,129,0.3); }
.milestone-pill { background: rgba(99,102,241,0.2); color: #A5B4FC; border: 1px solid rgba(99,102,241,0.3); }
.hint-pill { background: rgba(251,191,36,0.15); color: #FCD34D; border: 1px solid rgba(251,191,36,0.25); }

/* ── Stats ───────────────────────────────────────────── */
.modal-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  position: relative;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-value { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 700; color: #fff; }
.stat-label { font-size: 11px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px; }

/* ── Actions ─────────────────────────────────────────── */
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.btn-icon { font-size: 16px; }
