/* ── Metal Flow 97 ── */

.mf97-wrap {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  background: #0a0a0a;
  cursor: crosshair;
}

.mf97-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Lightbox ── */
.mf97-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mf97-lightbox[aria-hidden="false"] {
  opacity: 1;
  pointer-events: all;
}

.mf97-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(8px);
}

.mf97-lightbox__content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.mf97-lightbox[aria-hidden="false"] .mf97-lightbox__content {
  transform: scale(1);
}

.mf97-lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid rgba(192,192,192,0.25);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 24px 80px rgba(0,0,0,0.8),
    0 0 40px rgba(150,150,180,0.12);
  border-radius: 4px;
}

.mf97-lightbox__caption {
  color: #a0a0b0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  font-family: system-ui, sans-serif;
}

.mf97-lightbox__close {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ccc;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.mf97-lightbox__close:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Loading shimmer */
.mf97-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.03) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: mf97-shimmer 2.5s infinite;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s;
}

.mf97-wrap.mf97-loaded::after {
  opacity: 0;
}

@keyframes mf97-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .mf97-wrap {
    cursor: default;
  }
}
