body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

#certificate-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: url('bg.png') no-repeat center center;
  background-size: 70% auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#certificate-details {
  position: absolute;
  top: 35%;
  padding: 11.25px; /* Reduced by 75% */
  border-radius: 2.25px; /* Reduced by 75% */
  max-width: 90%;
  max-height: 80%;
  font-size: 5.4px; /* Reduced to 25% of original */
  text-align: center;
  overflow-y: auto;
}

#qr-code {
  position: absolute;
  bottom: 47%;
  left: 50%;
  right: 45%;
  background-size: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 50%; /* QR code container remains at 50% */
  height: 50%;
}

#name {
  font-size: 56.25px; /* Reduced by 25% */
  font-weight: 75; /* Reduced by 25% */
  font-family: 'Times New Roman', serif;
  margin-top: 40px;
}

#he {
  font-size: 22.5px; /* Reduced by 25% */
  font-weight: 3.75; /* Reduced by 25% */
  font-family: 'Times New Roman', serif;
}

#ho {
  font-size: 11.25px; /* Reduced by 25% */
  font-family: 'Times New Roman', serif;
}

#download-button {
  position: fixed;
  bottom: 18.75px; /* Reduced by 25% */
  left: 50%;
  transform: translateX(-50%);
  padding: 8.4375px 16.875px; /* Reduced by 25% */
  font-size: 13.5px; /* Reduced by 25% */
  cursor: pointer;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 42.1875px; /* Reduced by 25% */
  display: block;
}

#download-options {
  display: none;
  background: rgba(255, 255, 255, 0.9);
  padding: 16.875px; /* Reduced by 25% */
  border-radius: 8.4375px; /* Reduced by 25% */
  text-align: center;
  position: absolute;
  bottom: 7.5px; /* Reduced by 25% */
}

#download-options button {
  margin: 8.4375px; /* Reduced by 25% */
  padding: 8.4375px 16.875px; /* Reduced by 25% */
  font-size: 13.5px; /* Reduced by 25% */
  cursor: pointer;
  border: none;
  border-radius: 4.21875px; /* Reduced by 25% */
}

/* Mobile styles */
@media (max-width: 768px) {
  
  #certificate-container {
    /* Adjustments if needed */
    
  }

  #certificate-details {
    position: static;
    padding: 20px;
    border-radius: 0;
    max-width: 100%;
    max-height: none;
    margin-top: 25px;
    font-size: 3px;
    overflow: visible;
    height: 20;
  }

  #name {
    font-size: 12px; /* Reduced by 25% */
    font-weight: 7.5;
    font-family: 'Times New Roman', serif;
    margin-top: 0;
    line-height: 1; /* Reducing the space between lines */
  }

  #name br {
    line-height: 0; /* Remove extra space created by <br> */
    margin: 0; /* Ensure no margin is added by <br> */
    padding: 0; /* No padding added by <br> */
  }

  #he {
    font-size: 7px;
    font-weight: 3.75;
    font-family: 'Times New Roman', serif;
    line-height: 1; /* Optional: Adjust line height if needed */
  }

  #ho {
    font-size: 7px;
    font-family: 'Times New Roman', serif;
    line-height: 1; /* Optional: Adjust line height if needed */
  }

  #qr-code,
  #download-button,
  #download-options {
    display: none;
  }
}
