/* General Body Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  margin: 0;
  background-color: #111827; /* bg-gray-900 */
  color: #f3f4f6; /* text-gray-100 */
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 800px; /* max-w-3xl */
  background-color: #1f2937; /* bg-gray-800 */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5em; /* text-4xl sm:text-5xl */
  color: #60a5fa; /* text-primary-400 */
  font-weight: bold;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.125em; /* text-lg */
  color: #9ca3af; /* text-gray-400 */
}

/* Form Styles */
#formView, #processingView, #completionView {
  /* Views will be shown/hidden by JS */
}

#formView {
    display: block; 
}


#processingView, #completionView {
    display: none; /* Initially hidden */
    padding: 20px;
    text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%; 
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 500;
  color: #d1d5db; /* text-gray-300 */
}

.form-group label .required {
  color: #f87171; /* text-red-400 */
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  background-color: #374151; /* bg-gray-700 */
  border: 1px solid #4b5563; /* border-gray-600 */
  border-radius: 6px;
  color: #f3f4f6; /* text-gray-100 */
  box-sizing: border-box;
  font-size: 1rem;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
  color: #6b7280; /* placeholder-gray-500 */
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #3b82f6; /* focus:border-primary-500 */
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5); /* focus:ring-2 focus:ring-primary-500 */
}

input.error,
textarea.error,
select.error {
  border-color: #ef4444 !important; /* border-red-500 */
}

.error-message {
  font-size: 0.875rem;
  color: #fca5a5; /* text-red-400 */
  margin-top: 4px;
  min-height: 1em; 
}

/* Button Styles */
button[type="submit"], .secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: #2563eb; /* bg-primary-600 */
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  min-height: 46px; 
  text-decoration: none; 
}

button[type="submit"]:hover, .secondary-button:hover {
  background-color: #1d4ed8; /* hover:bg-primary-700 */
}

button[type="submit"]:disabled {
  background-color: #4b5563; /* disabled:bg-gray-500 */
  cursor: not-allowed;
}

.secondary-button {
  background-color: #4b5563; 
  display: inline-block; 
  width: auto; 
}
.secondary-button:hover {
  background-color: #374151;
}


.spinner { 
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  width: 20px;
  height: 20px;
  animation: spin 1s ease-infinite;
  margin-left: 10px; 
}

.page-spinner { 
  border: 5px solid rgba(209, 213, 219, 0.3); 
  border-radius: 50%;
  border-top-color: #60a5fa; 
  width: 60px;
  height: 60px;
  animation: spin 1.2s linear infinite;
  margin: 0 auto 20px auto; 
}


@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error and Response Styles */
.error-summary {
  background-color: rgba(220, 38, 38, 0.1); 
  border: 1px solid #dc2626; 
  color: #fecaca; 
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px; 
  text-align: left;
}

.error-summary strong {
  font-weight: bold;
}

.error-summary ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-top: 0.5rem;
}

/* Completion View Specific Styles */
#completionView #completionTitle {
  font-size: 1.8em; /* Slightly larger as requested */
  color: #60a5fa; 
  margin-bottom: 20px;
}

#completionView #completionMessage {
  font-size: 1.15em; /* Slightly larger */
  color: #e5e7eb; 
  margin-bottom: 30px; 
  padding: 20px; /* More padding */
  background-color: #272f3e; 
  border-radius: 8px; 
  border: 1px solid #374151; 
  line-height: 1.8; /* More line height for readability */
  text-align: center; /* Center align text within the message box */
}


/* Footer Styles */
footer {
  width: 100%;
  max-width: 800px;
  margin-top: 40px;
  text-align: center;
  color: #6b7280; /* text-gray-500 */
  padding-bottom: 20px;
}

footer p {
  margin-bottom: 0.5rem; 
}

footer p:last-child {
  margin-bottom: 0; 
}

.footer-link {
  color: #6b7280; 
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
  color: #9ca3af; 
}

/* Utility to hide elements */
.hidden {
    display: none !important;
}