/* ================================================================
   EVENTS — Saber Glow, Ghost Wrapper, Scroll Indicator, Toast
   mgm Vietnam 10-Year Anniversary Website
================================================================ */

/* SABER GLOW & GHOST WRAPPER (For .level-item) */
.level-item.is-passed { pointer-events: auto !important; cursor: pointer; }
.level-item.is-locked { opacity: 0.4 !important; pointer-events: none !important; }
.level-item.is-current {
  pointer-events: auto !important;
  cursor: pointer; position: relative; z-index: 5;
  --r: 0; --g: 255; --b: 255;
}
.level-item.is-current .popup-box,
.level-item.is-current .level-title,
.level-ghost-wrapper {
  animation: level-dense-saber-outline 1.5s infinite ease-in-out alternate;
}
.level-item.is-current .level-btn { position: relative; z-index: 2; }
.level-ghost-wrapper { position: absolute; pointer-events: none; z-index: 1; }

@keyframes level-dense-saber-outline {
  from {
    filter: drop-shadow(0 0 2px rgba(var(--r),var(--g),var(--b),0.5))
            drop-shadow(0 0 4px rgba(var(--r),var(--g),var(--b),0.3));
  }
  to {
    filter: drop-shadow(0 0 4px rgba(var(--r),var(--g),var(--b),1.0))
            drop-shadow(0 0 8px rgba(var(--r),var(--g),var(--b),0.8))
            drop-shadow(0 0 15px rgba(var(--r),var(--g),var(--b),0.6));
  }
}

/* BLINKING SCROLL INDICATOR (For .popup-box) */
.popup-scroll-indicator {
  position: sticky; bottom: -15px; margin: 0 auto;
  width: 40px; height: 40px; cursor: pointer; z-index: 999; display: none;
}
.popup-scroll-indicator.is-visible {
  display: flex; align-items: center; justify-content: center;
}
.popup-scroll-indicator::after {
  content: ''; width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid #000000;
  animation: bounce-blink 1.5s infinite;
}
@keyframes bounce-blink {
  0%, 100% { opacity: 0.3; transform: translateY(-3px); }
  50% { opacity: 1; transform: translateY(3px); }
}

/* EVENT ENDED TOAST NOTIFICATION */
.mgm-event-toast {
  position: fixed;
  background: rgba(30, 30, 30, 0.95); color: #ffffff;
  padding: 10px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  z-index: 10000; pointer-events: none;
  opacity: 0; scale: 0.9;
  transition: opacity 0.2s ease, scale 0.2s ease;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  white-space: nowrap;
}
.mgm-event-toast.is-visible { opacity: 1; scale: 1; }

/* LEVEL BUTTON CLIP-PATH (Arrow shape) */
.level-btn {
  clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%, 15% 50%);
}
.level-btn.is-first {
  clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%);
}
.level-item { position: relative; z-index: 1; }

@media screen and (max-width: 767px) {
  .level-btn {
    clip-path: polygon(0% 0%, 50% 20%, 100% 0%, 100% 80%, 50% 100%, 0% 80%) !important;
  }
  .level-item {
    position: relative !important;
    width: 100%;
    display: flex;
    justify-content: center;
  }
}

