body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  background-image: url('../images/elements_background.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

#app {
  flex: 1;
  width: 92%;
  max-width: 100vw;
  text-align: center;
  padding-top: 20px;
}

header {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

#headerLogo {
  max-width: 100%;
  cursor: pointer;
  z-index: 10;
}

#selectCrystal h2 img {
  max-width: 100%;
}

.crystalButtons {
  display: flex;
  justify-content: center;
  max-width: 100%;
  width: 100%;
  margin-top: 10px;
  padding: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.crystalButtons img {
  max-width: 25%;
  width: 100%;
  cursor: pointer;
  height: auto;
}

#crystalImage {
  max-width: 100%;
  height: auto;
}

#uploadSection,
#saveSection,
#zoomControls {
  margin-top: 5px;
}

#saveSection {
  margin-bottom: 10px;
}

#uploadPhotoBtn,
#saveCrystalBtn {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

#uploadPhotoBtn img,
#saveCrystalBtn img {
  max-width: 100%;
  height: auto;
}

/* Transparent backgrounds for buttons */
#uploadPhotoBtn,
#saveCrystalBtn {
  background-color: transparent;
  border: none;
}

/* Zoom Controls Styling */
#zoomControls {
  display: flex;
  justify-content: center;
  width: 85%;
  max-width: calc(85% * 0.85);
  /* 85% of uploadPhotoBtn's assumed width */
  margin: 0 auto;
  white-space: nowrap;
  /* Prevent wrapping */
}

#zoomControls img {
  cursor: pointer;
  height: auto;
}

#zoomInBtn,
#zoomOutBtn {
  max-width: 25%;
}

#zoomResetBtn {
  max-width: 50%;
}

.hidden {
  display: none;
}

/* Donation Bar Styling */
#donateBar {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-image: url('../images/elements_donateBar.png');
  background-repeat: repeat-x;
  /* This will stretch the image across the width */
  background-size: cover;
  padding: 10px 0;
  margin-top: auto;
  /* Pushes the donate bar to the bottom of the container */
  z-index: 100;
}

#donateBar img {
  max-width: 24%;
  /* Adjust based on how many items you have */
  margin: 0 2px;
  /* Space between images */
  height: auto;
  cursor: pointer;
}

@media screen and (min-width: 768px) {
  #app {
    max-width: 51.2%;
    transform: scale(0.8);
    transform-origin: top center;
  }

  .crystalButtons {
    max-width: 100%;
  }
}