body {
  background-color: #6b21a8;
  font-family: 'Poppins', sans-serif;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  flex-direction: column;
  margin-top: 15%;
}

body.loaded {
  opacity: 1;
  visibility: visible;
}

html, body {
  zoom: 1;
  transform: none;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.main-container {
  width: 90%;
  max-width: 800px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  text-align: left;
  margin: 2rem auto;
  position: relative;
}

h1, h2 {
  font-family: 'Poppins';
  text-align: left;
  margin-top: 0;
}

.gradient-text {
  background: linear-gradient(90deg, #c084fc, #a855f7, #7e22ce);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#form-title {
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1.8rem;
  color: #7e22ce;
}

#form-description {
  font-size: 1.1rem;
  color: #e9d5ff;
  margin: 0.5rem 0 1.5rem 0;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  white-space: pre-line;
  word-break: break-word;
}

#form-cover-image img {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 12px;
}

#form-viewer-container,
#form-viewer-container * {
  color: white !important;
  align-self: middle !important;
}

#form-viewer-container select,
#form-viewer-container select option {
  color: black !important;
  background-color: white !important;
  border: 1px solid #ccc;
}

#form-viewer-container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: auto;
  padding: 20px;
  background: transparent;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-image-slice: 1;
  border-width: 3px;
  border-image-source: linear-gradient(90deg, #c084fc, #a855f7, #7e22ce);
  width: 90%;
  max-width: 800px;
  backdrop-filter: blur(8px);
  text-align: left;
  position: relative;
  align-items: center;
}

#loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  text-align: center;
  color: white;
  font-size: 1.2rem;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.spinner {
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-top: 6px solid white;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  width: 100%;
}

.gradient-btn {
  background: linear-gradient(90deg, #c084fc, #a855f7, #7e22ce);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: fit-content;
  position: relative;
  z-index: 1;
}

.gradient-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-right {
  margin-left: auto;
}

.btn-left {
  margin-right: auto;
}

.btn-center {
  margin-left: auto;
  margin-right: auto;
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  margin: 2rem 0;
}

footer {
  width: 100%;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  margin-top: auto;
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

footer a {
  color: #c084fc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #a855f7;
}

#error-message {
  display: none;
  color: #f87171;
  text-align: center;
  margin-top: 1rem;
  font-weight: 500;
}

#thank-you {
  display: none;
  text-align: center;
  margin-top: 2rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: #7e22ce;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

input, select, textarea {
  background: #2e1065;
  color: #f3e8ff;
  border: 1.5px solid #a855f7;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 12px;
  box-sizing: border-box;
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #c084fc;
  box-shadow: 0 0 0 2px #a855f733;
}

@media only screen and (max-width: 767px) {
  html, body {
    zoom: 1;
    transform: none;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}
