.model-modal-content {
  position: relative;
  width: 90vw;
  height: 80vh;
  max-width: 1200px;
  background: 
    radial-gradient(ellipse at bottom, rgba(0, 255, 234, 0.3) 0%, transparent 60%),
    radial-gradient(circle at top, rgba(255, 40, 180, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20, 10, 45, 0.95) 0%, rgba(10, 2, 25, 0.98) 100%);
  border: 1px solid rgba(0, 255, 234, 0.4);
  border-radius: 16px;
  box-shadow: 
    0 0 0 1px rgba(255, 40, 180, 0.2) inset,
    0 25px 65px rgba(0,0,0,0.9),
    0 0 40px rgba(0, 255, 234, 0.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
}

.model-modal-content::before {
  content: "";
  position: absolute;
  inset: -50%;
  background-image: 
    linear-gradient(rgba(0, 255, 234, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 234, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(600px) rotateX(70deg) translateY(100px) translateZ(-200px);
  opacity: 0.8;
  pointer-events: none;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: perspective(600px) rotateX(70deg) translateY(0px) translateZ(-200px); }
  100% { transform: perspective(600px) rotateX(70deg) translateY(40px) translateZ(-200px); }
}

.model-modal-content::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(to top, rgba(0, 255, 234, 0.08), transparent);
  pointer-events: none;
}

#model-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

model-viewer {
  width: 100%;
  height: 100%;
  --poster-color: transparent;
  outline: none;
}

.model-close {
  position: absolute; 
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 12px;
  color: #fff; 
  font-size: 26px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  line-height: 1;
}

.model-close:hover {
  background: rgba(255, 40, 180, 0.6);
  border-color: rgba(255, 40, 180, 1);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 40, 180, 0.4);
}

.lightbox-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8,2,26,0.92);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox-backdrop.active { opacity: 1; pointer-events: auto; }

.lightbox-img {
  max-width: 100%; max-height: 100%;
  border: 2px solid var(--shadow-ink); border-radius: 14px;
  box-shadow: 0 8px 0 var(--shadow-ink), 0 24px 60px rgba(0,0,0,0.6);
}
