/* Animación de "maestría completada" (overlay)
   (archivo: css/components/mastery-complete.css) */
/* ============================================================
   MASTERY COMPLETE ANIMATION OVERLAY
   ============================================================ */
#mastery-complete-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: transparent;
}
#mastery-complete-overlay.active {
  pointer-events: all;
  opacity: 1;
}
#mastery-complete-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.35s ease;
}
#mastery-complete-overlay.active #mastery-complete-backdrop {
  background: rgba(0,0,0,0.82);
}
#mastery-complete-stage {
  position: relative;
  width: min(700px, 92vw);
  aspect-ratio: 700 / 450;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 3px #222, 0 20px 60px rgba(0,0,0,0.8);
}
#mc-img-default,
#mc-img-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}
#mc-img-default {
  z-index: 1;
  filter: none;
}
#mc-img-banner {
  z-index: 2;
  opacity: 0;
}
#mc-light-beam {
  position: absolute;
  top: -20%;
  left: -30%;
  width: 22%;
  height: 140%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255,255,255,0.08) 30%,
    rgba(255,240,160,0.95) 50%,
    rgba(255,255,255,0.08) 70%,
    transparent 100%
  );
  filter: blur(4px);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transform: skewX(-12deg);
}
#mc-flash-burst {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%,
    rgba(255,255,220,1) 0%,
    rgba(255,220,80,0.6) 35%,
    transparent 70%
  );
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  border-radius: 16px;
}
#mc-label {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: 14px 20px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  font-family: 'Fredoka One', sans-serif;
  font-size: clamp(1.1rem, 3.5vw, 1.75rem);
  letter-spacing: 1.5px;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 18px rgba(255,215,0,0.9), 0 2px 6px rgba(0,0,0,0.8);
  z-index: 11;
  opacity: 0;
  transform: translateY(12px);
}
#mastery-complete-stage.glow-ring {
  animation: mcRingPulse 0.9s ease-out forwards;
}
@keyframes mcRingPulse {
  0%   { box-shadow: 0 0 0 3px #222, 0 0 0px rgba(255,215,0,0); }
  40%  { box-shadow: 0 0 0 3px #ffd700, 0 0 60px rgba(255,215,0,0.7); }
  100% { box-shadow: 0 0 0 3px #ffd700, 0 0 24px rgba(255,215,0,0.35); }
}
#mc-dismiss-hint {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.5px;
  z-index: 12;
  opacity: 0;
  transition: opacity 0.4s ease 1.8s;
  pointer-events: none;
}
#mastery-complete-overlay.active #mc-dismiss-hint {
  opacity: 1;
}

/* ── Star outro canvas ── */
#mc-star-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.15s ease;
}
#mc-star-canvas.visible { opacity: 1; }

/* ── Mastery date ── */
#detail-date-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.72rem;
  color: #3a3a3a;
  letter-spacing: 0.3px;
  margin-top: 2px;
  min-height: 0;
}
#detail-date-text:empty { display: none; }

