body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: "Lato", sans-serif;
  background-color: #222;
  color: #fff;
}

.grid-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#grid {
  display: grid;
  grid-template-columns: repeat(179, 1fr);
  grid-auto-rows: 1fr;
  width: 90vmin;
  height: 90vmin;
  position: relative;
  overflow: hidden;
}

.logo-image {
  position: absolute;
  width: 98%;
  height: 98%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: 0;
  opacity: 0;
  display: none;
}

.logo-image.loaded {
  opacity: 1;
  display: block;
}
.grid-square {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: rgba(51, 51, 51, 1);
  transition: background-color 0.5s ease, opacity 0.5s ease;
  position: relative;
  z-index: 1;
}

.grid-revealed {
  background-color: transparent;
  opacity: 1;
}

.wallet-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
  width: 70vmin;
  z-index: 2;
}

.wallet-frame {
  border: 2px solid #fff;
  padding: 1rem;
  margin-bottom: 1rem;
  font-weight: bold;
  word-break: break-all;
  max-width: 100%;
}

.copy-button {
  padding: 0.5rem 1rem;
  background-color: #00ff00;
  color: #000;
  font-weight: 500;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;

  display: inline-block;
  height: auto;
}

.copy-button:hover {
  background-color: #007f00;
}

.progress-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 1rem;
}

.progress-bar {
  width: 80%;
  max-width: 20rem;
  height: 1.5rem;
  background-color: #555;
  border: 1px solid #fff;
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
}

#progress-bar-inner {
  height: 100%;
  width: 0%;
  background-color: #00ff00;
  transition: width 0.3s;
}

#progress-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
}

.popup {
  position: absolute;
  background-color: #00ff00;
  color: #000;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 10;
  pointer-events: none;
}

.content-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 80%;
  max-width: 500px;
  padding: 1.5rem 0;
  margin: 0 auto;
}

.wallet-container {
  text-align: center;
  position: relative;
}

.milestone-text {
  margin-top: 1rem;
  font-size: 1rem;
  font-family: "Lato", sans-serif;
  color: white;
  text-align: center;
  opacity: 0.8;
}

.popup.show {
  opacity: 0.7;
}

@keyframes blink {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(0, 255, 0, 0.9);
  }
  100% {
    background-color: transparent;
  }
}

.blinking {
  animation: blink 0.8s infinite;
  z-index: 2;
}

.grid-square {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: rgba(51, 51, 51, 1);
  transition: background-color 0.5s ease, opacity 0.5s ease;
  position: relative;
  z-index: 1;
}

.grid-revealed {
  background-color: transparent;
  opacity: 1;
}

@media (max-width: 768px) {
  .wallet-container {
    width: 100%;
    height: 100%;
  }

  .progress-bar {
    width: 90%;
  }

  #grid {
    width: 90vmin;
    height: 90vmin;
  }

  .copy-button {
    padding: 0.5rem 1rem;
  }

  .wallet-frame {
    font-size: 1.2rem;
  }

  .popup {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    bottom: 3rem;
    max-height: 1.2rem;
  }
}

@media (max-width: 480px) {
  .wallet-container {
    width: 100%;
    height: 100%;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
  }

  .wallet-frame {
    font-size: 1rem;
  }

  .progress-bar {
    width: 100%;
  }

  #grid {
    width: 90vmin;
    height: 90vmin;
  }

  .popup {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    bottom: 2rem;
    max-height: 1.2rem;
  }
}

@media (max-width: 409px) {
  .content-wrapper {
    font-size: 0.6rem;
  }
  .wallet-container {
    width: 60vmin;
    padding-top: 0;
    padding-bottom: 0;
  }

  .wallet-frame {
    font-size: 0.6rem;
  }

  .milestone-text {
    font-size: 0.5rem;
  }

  .progress-bar {
    width: 70%;
  }

  .progress-container {
    margin-top: 0;
  }

  .milestone-text {
    margin-top: 0.2rem;
  }
  .copy-button {
    font-size: 0.5rem;
  }
}
