h1{
  text-align: center;
}


body {
  margin: 0;
  background: radial-gradient(circle at top, #0c1a0c, #050a05);
  color: #7CFF7C;
  font-family: "VT323", "Courier New", monospace;
  text-shadow: 0 0 6px rgba(124,255,124,.6);
}


main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
}

figure {
  border: 1px solid #4bd64b;
  padding: 8px;
  background: rgba(10,20,10,.85);
  box-shadow: inset 0 0 10px rgba(124,255,124,.15),
              0 0 10px rgba(124,255,124,.25);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

figure:hover {
  transform: scale(1.02);
  box-shadow: 0 0 18px rgba(124,255,124,.6);
}

figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

figcaption {
  margin-top: 6px;
  text-align: center;
  color: #4bd64b;
  font-size: 0.9rem;
}

dialog.modal {
  border: 2px solid #4bd64b;
  background: linear-gradient(180deg, #081408, #030703);
  box-shadow: 0 0 25px rgba(124,255,124,.6);
  padding: 16px;
}

dialog::backdrop {
  background: rgba(0,0,0,.8);
}

.modal-content img {
  height: auto;
  max-height: 80vh;
  aspect-ratio: auto;
  object-fit: contain;
  width: 100%;
}

.closingbutton {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: 1px solid #4bd64b;
  color: #7CFF7C;
  font-size: 1.2rem;
  padding: 4px 10px;
  cursor: pointer;
}

.closingbutton:hover {
  background: rgba(124,255,124,.15);
  box-shadow: 0 0 10px rgba(124,255,124,.6);
}

.footer {
  text-align: center;
  padding: 16px;
  border-top: 1px solid #4bd64b;
  margin-top: 24px;
}

@media (min-width: 400px) {
  main { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 800px) {
  main { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
  main { grid-template-columns: repeat(4, 1fr); }
}