body {
  font-family: Arial, sans-serif;
  background: #111;
  color: white;
  text-align: center;
  margin: 0;
  padding: 40px;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

header .logo {
  width: 120px;
  height: auto;
  margin-bottom: 4px;
}

header .edition {
  color: #c15478;
  font-size: 1.2rem;
  margin-top: -4px;
}

header .hint {
  opacity: 0.7;
  font-size: 0.9rem;
  margin-top: 4px;
}

.viewer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.viewer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.main-image-container {
  width: 80vw;
  max-width: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background: #111;
  position: relative;
}

.main-image-container img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  transition: opacity 0.5s ease;
}

.nav-btn {
  background: #c15478;
  color: white;
  border: none;
  font-size: 28px;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-btn:hover {
  background: #c15478;
}

.download-container {
  margin-top: 15px;
}

.download-btn {
  background: #c15478;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.download-btn:hover {
  background: #c15478;
}

.thumbnails {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.thumbnail {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.7;
  transition: transform 0.2s, opacity 0.2s;
  border: 2px solid transparent;
  border-radius: 6px;
}

.thumbnail:hover {
  transform: scale(1.05);
  opacity: 1;
}

.thumbnail.active {
  border-color: #c15478;
  opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .main-image-container {
    width: 90vw;
  }

  .thumbnails {
    grid-template-columns: repeat(4, 1fr); /* 4 thumbnails per row */
    gap: 6px;
  }

  .thumbnail {
    aspect-ratio: 1 / 1; /* square thumbnails */
    width: 100%;
  }

  .nav-btn {
    font-size: 24px;
    padding: 10px 14px;
  }

  header .logo {
    width: 90px;
  }

  header .edition {
    font-size: 1rem;
  }

  .download-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}
