.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.screenshot-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.screenshot-item img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
.img-preview-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  transition: opacity 0.2s;
  animation: fadeInModal 0.25s;
}
@keyframes fadeInModal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.img-preview-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.25s;
}
@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.img-preview-content {
  max-width: 60vw;
  max-height: 65vh;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  background: #fff;
  margin: auto;
  display: block;
  transition: box-shadow 0.2s;
}
.close-btn {
  position: absolute;
  top: -32px;
  right: -16px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 100001;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  user-select: none;
  border: none;
  transition: background 0.2s;
}
.close-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}
.img-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  z-index: 100001;
  transition: background 0.2s;
  user-select: none;
}
.img-nav-btn.left {
  left: -60px;
  right: auto;
}
.img-nav-btn.right {
  right: -60px;
  left: auto;
}
.img-nav-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}
@media (max-width: 900px) {
  .img-preview-content {
    max-width: 80vw;
    max-height: 70vh;
  }
  .img-nav-btn.left {
    left: -32px;
  }
  .img-nav-btn.right {
    right: -32px;
  }
}
@media (max-width: 600px) {
  .screenshots-grid {
    grid-template-columns: 1fr;
  }
  .img-preview-content {
    max-width: 98vw;
    max-height: 70vh;
  }
  .close-btn {
    top: -16px;
    right: -8px;
    font-size: 1.7rem;
    width: 36px;
    height: 36px;
  }
  .img-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }
  .img-nav-btn.left {
    left: -16px;
  }
  .img-nav-btn.right {
    right: -16px;
  }
}
