@font-face {
  font-family: "PxPlus IBM VGA8";
  src: url("../../fonts/PxPlus_IBM_VGA8.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  background: radial-gradient(
      ellipse 800px 400px at 10% 20%,
      #330066 0%,
      transparent 50%
    ),
    radial-gradient(ellipse 600px 800px at 90% 80%, #006633 0%, transparent 50%),
    radial-gradient(
      ellipse 1000px 300px at 50% 10%,
      #1a0033 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 400px 1000px at 80% 30%,
      #003d1a 0%,
      transparent 70%
    ),
    radial-gradient(ellipse 700px 500px at 20% 90%, #2d0066 0%, transparent 50%),
    #0a0a0a;
  background-attachment: fixed;
  font-family: "PxPlus IBM VGA8", "Courier New", monospace;
  color: #00ff00;
  text-shadow: 0 0 3px #00ff00;
  font-size: 18px;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      ellipse 400px 200px at 15% 85%,
      rgba(120, 255, 120, 0.12) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 300px 600px at 85% 15%,
      rgba(200, 100, 255, 0.15) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 500px 300px at 45% 45%,
      rgba(0, 255, 150, 0.08) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 250px 400px at 95% 95%,
      rgba(150, 50, 255, 0.1) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 600px 150px at 70% 25%,
      rgba(120, 255, 120, 0.06) 0%,
      transparent 75%
    ),
    radial-gradient(
      ellipse 200px 500px at 25% 60%,
      rgba(200, 100, 255, 0.08) 0%,
      transparent 60%
    );
  pointer-events: none;
  z-index: -1;
}

h1 {
  text-align: center;
  margin-top: 50px;
  color: #00ff00;
  text-shadow: 0 0 7px #00ff00, 0 0 12px #00ff00;
  font-size: 2.2em;
  font-weight: bold;
}

.image-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
}

figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 60px;
  z-index: 1;
}

figure:first-of-type {
  margin-top: 0;
}

figure:hover {
  transform: scale(1.1);
}

img {
  width: 450px;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

figcaption {
  font-size: 1rem;
  margin-top: 5px;
  background-color: rgba(0, 255, 0, 0.2);
  border-radius: 5px;
  padding: 2px 5px;
  width: fit-content;
  color: #00ff00;
  text-shadow: 0 0 3px #00ff00;
}

.line-segment {
  border-bottom: 5px dashed red;
  position: absolute;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  height: 0px;
}

.line-segment.visible {
  opacity: 1;
}

@media (min-width: 768px) {
  figure:nth-of-type(even) {
    align-self: flex-end;
  }

  figure:nth-of-type(4n + 1) {
    align-self: center;
  }

  figure:nth-of-type(4n + 2) {
    align-self: flex-end;
  }

  figure:nth-of-type(4n + 3) {
    align-self: center;
  }

  figure:nth-of-type(4n + 4) {
    align-self: flex-start;
  }
}

p {
  text-align: center;
}

.back-button {
  color: #9966cc;
  position: absolute;
  top: 10px;
  left: 10px;
  cursor: pointer;
  z-index: 1000;
  text-decoration: none;
  font-size: 2rem;
  text-shadow: 0 0 3px #9966cc;
  transition: all 0.3s ease;
  font-weight: bold;
}

.back-button:hover {
  color: #b388d6;
  text-shadow: 0 0 5px #9966cc, 0 0 8px #9966cc;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  h1 {
    text-shadow: 0 0 3px #00ff00;
  }

  .back-button {
    color: #7a4d99;
    text-shadow: 0 0 2px #7a4d99;
  }

  .back-button:hover {
    color: #8b5aa6;
    text-shadow: 0 0 3px #7a4d99;
  }
}

@media (max-width: 767px) {
  figure:hover {
    transform: none;
  }

  img {
    width: 100%;
    max-width: 300px;
    height: auto;
  }
}
