*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --background: #f7f7f7;
  --foreground: #0a0a0a;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --primary: #171717;
  --primary-foreground: #fafafa;
  --border: #737373;
  --ring: #0a0a0a;
  --destructive: #ef4444;
  --radius: 0.5rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

.container {
  min-height: 100vh;
  padding: 3rem 1rem;
}

.form-container{
    box-shadow: 10px 10px 5px rgb(200, 200, 200)
}

.form-wrapper {
  max-width: 42rem;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.subheader {
    text-align: left;
    margin-bottom: 1.5rem;
}

.header h1 {
  font-size: 1.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.header p {
  color: var(--muted-foreground);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(10, 10, 10, 0.1);
}

input::placeholder, textarea::placeholder {
  color: var(--muted-foreground);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-item input[type="radio"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-item label {
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
}

.error-message {
  color: var(--destructive);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
}

input.error, select.error, textarea.error {
  border-color: var(--destructive);
}

.submit-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-foreground);
  background-color: var(--primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  background-color: #00b630;
}

.submit-btn:active {
  transform: scale(0.99);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.loading-overlay.show {
    display: flex;
}

/* Card */
.progress-card {
    width: 100%;
    max-width: 320px;
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    text-align: center;
}

/* Text */
.loading-text {
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #1a73e8, #4f9cff);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* Percentage */
.progress-percent {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

/* Mobile touch safety */
@media (max-width: 480px) {
    .progress-card {
        max-width: 100%;
    }
}

/* Success State */
.success-container {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.success-container.show {
  display: flex;
}

.form-container.hide {
  display: none;
}

.success-content {
  max-width: 28rem;
  text-align: center;
}

.success-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  background-color: rgba(23, 23, 23, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--primary);
}

.success-content h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.success-content > p {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.success-content .highlight {
  color: var(--foreground);
  font-weight: 500;
}

.info-box {
  background-color: var(--muted);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.info-box p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.info-box p:last-child {
  margin-bottom: 0;
}

/* QRCode whatsapp */
.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.button-container {
  display: inline-flex;
  /* Optional: Adds space between the buttons */
  gap: 25px;
  /* Optional: Centers the buttons within their parent container */
  justify-content: center;
}

.join-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    background-color: lightgreen;
    border: 1px solid green;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

.join-btn:hover {
    background-color: rgb(69, 196, 69);
}

.back-btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s;
}

.back-btn:hover {
  background-color: var(--destructive);
}