/* Reset and base styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Remove fixed background from body */
body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background overlay that works everywhere (including iOS Safari) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
    url("assets/background.jpg") no-repeat center center;
  background-size: cover;
  z-index: -1; /* keep it behind all content */
}

/* Fullscreen background image */
body {
  background:
    linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
    url("assets/background.jpg") no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
}

/* Overlay container */
.overlay {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;       /* vertical centering */
  justify-content: center;   /* horizontal centering */
  padding: 20px;
}

/* Central content container */
.container {
  max-width: 700px;
  width: 100%;
  color: #fff;
  text-align: center;
  flex: 1 1 auto; /* allow scrolling if content overflows */
}

/* Headings */
h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

/* Descriptions */
.description {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Contract address styling */
.contract-address {
  display: inline-block;
  font-family: monospace, monospace;
  word-break: break-word;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 10px;
}

/* Social link icons */
.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.social-links img {
  width: 50px;
  height: 50px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.social-links img:hover,
.social-links a:focus img {
  transform: scale(1.1);
  outline: none;
}

/* Art section */
.art-section {
  margin-top: 40px;
  text-align: center;
}

.art-section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.sub-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.sub-link {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.sub-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

/* Gallery images */
.gallery-img {
  width: 100%;
  height: auto;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.gallery-img:hover {
  transform: scale(1.05);
}

/* Popup full-size image */
.popup {
  display: none;
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.popup img {
  max-width: 90%;
  max-height: 80%;
  margin-bottom: 20px;
  border-radius: 8px;
}

.popup .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.popup button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  font-size: 2rem;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 50%;
  color: white;
}

#prevBtn { left: 20px; }
#nextBtn { right: 20px; }

/* Gallery buttons */
.gallery-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.gallery-buttons.bottom {
  margin-top: 40px;
  margin-bottom: 20px;
}

.gallery-buttons .btn {
  background-color: rgba(255,255,255,0.1);
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.gallery-buttons .btn:hover {
  background-color: rgba(255,255,255,0.2);
}

/* Responsive tweaks */
@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }

  .description {
    font-size: 1rem;
  }

  .social-links img {
    width: 40px;
    height: 40px;
  }

  .art-section h2 {
    font-size: 1.5rem;
  }

  .sub-link {
    padding: 8px 16px;
  }

  .gallery-img {
    border-radius: 4px;
  }
}
