/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
body {
  display: flex;
  padding: 0 10px;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c3ecff, #e2f7ff);
}
.wrapper {
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 15px;
  padding: 25px;
  transition: height 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  text-align: center;
  animation: fadeIn 1s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
header h1 {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  animation: slideDown 1s ease-in-out;
}
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
header p {
  margin-top: 10px;
  color: #666;
  font-size: 18px;
  animation: slideDown 1.2s ease-in-out;
}
.form {
  margin: 20px 0 25px;
  animation: fadeIn 1.4s ease-in-out;
}
.section {
  margin-bottom: 20px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}
label {
  display: block;
  margin: 10px 0 5px;
  font-size: 16px;
  color: #555;
  font-weight: bold;
}
.form input[type="text"],
.form input[type="color"],
.form input[type="file"],
.form select,
.form button {
  width: 100%;
  height: 45px;
  border: none;
  outline: none;
  border-radius: 10px;
  transition: 0.1s ease;
  margin-bottom: 15px;
  font-size: 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards;
}
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}
.form input[type="text"],
.form input[type="color"] {
  padding: 0 15px;
  border: 1px solid #ddd;
  background: rgba(255, 255, 255, 0.7);
}
.form input[type="text"]:focus,
.form input[type="color"]:focus {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}
.form input::placeholder {
  color: #999;
}
.form input[type="file"] {
  display: none;
}
.image-upload-label {
  display: inline-block;
  padding: 10px 15px;
  background: #3498DB;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.2s forwards;
}
.image-upload-label:hover {
  background: #2980B9;
}
.file-name {
  display: block;
  font-size: 14px;
  color: #777;
  margin-top: 5px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.4s forwards;
}
.remove-image {
  display: block;
  padding: 10px 15px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.6s forwards;
}
.remove-image:hover {
  background: #c0392b;
}
#text-options {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
#text-options label {
  margin-right: 10px;
  margin-bottom: 5px;
}
#text-options input[type="radio"] {
  margin-right: 5px;
}
#custom-text {
  width: calc(100% - 10px);
  margin-left: 25px;
  margin-bottom: 10px;
}
.button-group {
  display: flex;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.8s forwards;
}
.button-group button {
  width: 48%;
  border: none;
  outline: none;
  border-radius: 10px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}
#generate-btn {
  background: #3498DB;
  color: white;
}
#generate-btn:hover {
  background: #2980B9;
}
#reset-btn {
  background: #e74c3c;
  color: white;
}
#reset-btn:hover {
  background: #c0392b;
}
.qr-code {
  opacity: 0;
  display: flex;
  padding: 20px 0;
  border-radius: 10px;
  align-items: center;
  pointer-events: none;
  justify-content: center;
  border: 1px solid #ccc;
  background: rgba(255, 255, 255, 0.7);
  animation: fadeIn 2s ease-in-out;
}
.wrapper.active .qr-code {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.5s 0.05s ease;
}
#qr-canvas {
  width: 100%;
  height: auto;
  border-radius: 10px;
}
@keyframes zoomIn {
  to { opacity: 1; transform: scale(1); }
}
#download-btn {
  color: #fff;
  cursor: pointer;
  margin-top: 20px;
  font-size: 17px;
  background: #3498DB;
  border: none;
  outline: none;
  border-radius: 10px;
  width: 100%;
  height: 45px;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 2s forwards;
}
#download-btn:hover {
  background: #2980B9;
}
#download-btn .icon {
  margin-right: 10px;
  font-size: 24px;
}
.wrapper.active + #download-btn {
  display: flex;
}
.loading-container {
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  background-color: rgba(240, 240, 240, 0.8);
  z-index: 10;
}
.loading-text {
  font-size: 2em;
  font-weight: bold;
  position: relative;
}
.loading-text span {
  position: relative;
  display: inline-block;
  animation: blurEffect 5s infinite linear;
}
@keyframes blurEffect {
  0% {
    filter: blur(0px);
  }
  20% {
    filter: blur(5px);
  }
  40% {
    filter: blur(0px);
  }
  60% {
    filter: blur(0px);
  }
  80% {
    filter: blur(0px);
  }
  100% {
    filter: blur(0px);
  }
}
.loading-text span:nth-child(1) { animation-delay: 0s; }
.loading-text span:nth-child(2) { animation-delay: 0.5s; }
.loading-text span:nth-child(3) { animation-delay: 1s; }
.loading-text span:nth-child(4) { animation-delay: 1.5s; }
.loading-text span:nth-child(5) { animation-delay: 2s; }
.loading-text span:nth-child(6) { animation-delay: 2.5s; }
.loading-text span:nth-child(7) { animation-delay: 3s; }
.loading-text span:nth-child(8) { animation-delay: 3.5s; }
.loading-text span:nth-child(9) { animation-delay: 4s; }
.loading-text span:nth-child(10) { animation-delay: 4.5s; }
.line {
  position: absolute;
  bottom: -2px; /* Adjust the distance of the line relative to the text */
  left: 0;
  height: 2px;
  background-color: black;
  animation: lineAnimation 5s infinite;
}
@keyframes lineAnimation {
  0%, 100% {
    width: 0;
  }
  50% {
    width: 100%;
  }
}
.custom-select-wrapper {
  position: relative;
  user-select: none;
}
.custom-select {
  position: relative;
  display: inline-block;
  width: 100%;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  font-size: 16px;
  color: #575757;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #ddd;
  border-radius: 10px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.6s forwards;
}
.custom-options {
  position: absolute;
  display: none;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  top: 100%;
  left: 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 10px;
  z-index: 99;
}
.custom-option {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  font-size: 16px;
  color: #575757;
  cursor: pointer;
}
.custom-option .preview-canvas {
  width: 30px;
  height: 30px;
  margin-left: 10px;
}
.custom-option:hover,
.custom-option.selected {
  background: #f1f1f1;
}
.custom-select.open .custom-options {
  display: block;
}
.custom-select .arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #575757;
  margin-left: 10px;
}
