/* Ensure full height layout and structured positioning */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
  color: #fff;
  display: flex;
  flex-direction: column;
}

/* Main content wrapper to allow footer to push down */
main.page-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Title and text */
h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-align: center;
}

p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-align: center;
}

/* Container for QR section */
.qr-container {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 30px 20px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  width: 90%;
  max-width: 500px;
  text-align: center;
}

/* Input and button */
input[type="text"] {
  padding: 12px;
  font-size: 16px;
  width: 100%;
  border: none;
  border-radius: 8px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

button {
  padding: 12px 24px;
  font-size: 16px;
  background-color: #00c9a7;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #00b395;
}

/* QR code display */
#qrcode {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* download button */
#download-btn {
  background-color: #007bff;
  color: white;
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  opacity: 1 !important;
}

#download-btn:hover {
  background-color: #005ec2;
}

#download-btn,
#download-btn.visible,
#download-btn.fade,
#download-btn.qr-visible {
  transition: none !important;
  opacity: 1 !important;
}

/* Back link */
a {
  display: block;
  margin-top: 30px;
  color: #ddd;
  font-size: 0.9rem;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Footer that sticks at bottom */
footer {
  text-align: center;
  color: #ccc;
  font-size: 0.5em;
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  box-shadow: 0 -2px 4px rgba(0,0,0,0.3);
}

/* Toggle switch */
.toggle-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #eee;
  cursor: pointer;
}

.toggle-label input {
  display: none;
}

.slider {
  position: relative;
  width: 50px;
  height: 26px;
  background-color: #ccc;
  border-radius: 50px;
  transition: background-color 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

input:checked + .slider {
  background-color: #00c9a7;
}

input:checked + .slider::before {
  transform: translateX(24px);
}

/* QR fade */
.qr-fade {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.qr-visible {
  opacity: 1;
}

/* Buttons alignment */
.button-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
