body {
  font-family: Arial;
  background: #f4f4f4;
  margin: 30px;
}

h2 {
  margin-top: 50px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

:root {
  --bg: #ffffff;
  --card: #dadada;
  --muted: #1b2533;
  --accent: #4e46e3;
  --glass: rgba(255, 255, 255, 0.04);
}

*{box-sizing:border-box}

/* Remove all border radius to keep square corners per user request */
* { border-radius: 0 !important; }

.material-icons{vertical-align:middle;margin-right:8px;font-size:18px;box-sizing: border-box}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #000000;
  margin: 0;
  padding: 28px;
}

h1 {
  font-size: 28px;
  margin: 0 0 18px 0
}

h2 {
  color: var(--accent);
  margin: 30px 0 12px
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
  display: flex;
  flex-direction: column
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(15, 23, 36, 0.6)
}

.card p {
  margin: 10px 12px 14px 12px;
  color: var(--muted);
  font-size: 14px
}

.card a {
  margin: 0 12px 12px 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 600
}

.image-container {
  position: relative;
  width: 100%;
  height: 160px;
  background: var(--glass);
  display: flex;
  align-items: center;
  justify-content: center
}

.image-container .loader {
  border: 4px solid rgba(255, 255, 255, 0.06);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite
}

@keyframes spin {
  0% {
    transform: rotate(0)
  }

  100% {
    transform: rotate(360deg)
  }
}

.lazy-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease;
  border-radius: 6px
}

.lazy-img.loaded {
  opacity: 1
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000
}

.modal-content {
  background: #dedede;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 92vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
}

.modal-info {
  padding: 18px;
  background: transparent;
  color: #000000
}

.modal-info h2 {
  margin: 0 0 10px 0
}

.modal-controls {
  display: flex;
  gap: 10px;
  align-items: center
}

.modal-download {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--accent);
  border-radius: 8px;
  text-decoration: none
}

.slideshow-btn,
.pause-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: rgb(0, 0, 0);
  cursor: pointer
}

.fullscreen-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  color: #000000;
  cursor: pointer
}

.modal-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  transform: translateY(-50%);
  pointer-events: none
}

.nav-btn {
  pointer-events: all;
  color: rgb(0, 0, 0);
  border: none;
  padding: 5px;
  border-radius: 8px;
  font-size: 1px;
  background: rgb(222, 222, 222);
  cursor: pointer;
  border-radius: 65px !important;
}

.nav-btn .material-icons {
  font-size: 24px;
  margin: 0;
}

.close {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 40px;
  background: rgba(255, 255, 255, 0.03);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: #000000;
}

.close .material-icons {
  font-size: 30px;
}

@media (max-width:600px) {
  .image-container {
    height: 140px
  }

  .lazy-img {
    border-radius: 4px
  }
}