body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 100; 
  background: linear-gradient(135deg, #e0e0e0, #ffffff);
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

.contenedor {
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 30px;
  width: 90%;
  max-width: 380px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 0 0 0.8px rgba(255, 255, 255, 0.6),
    0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

h1 {
  font-weight: 650; 
  text-align: center;
  margin-bottom: 25px;
  margin-top: 25px;
  font-size: 25px;
}

input, textarea, select {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  box-sizing: border-box; 
}

form label {
  display: block;
  margin-top: 5px;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 16px;
}

form input, form select {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 12px;
  font-size: 16px;
  color: #000;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100%;
  margin-top: 5px;
}

form input::placeholder {
  color: rgba(0, 0, 0, 0.4);
  font-size: 16px;
}

form button {
  margin-top: 25px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 18px;
  background: rgba(209, 33, 33, 0.85);
  color: white;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(180, 20, 20, 0.4);
  transition: background 0.2s ease;
}

form button:hover {
  background: rgba(220, 40, 40, 0.9);
}

.header {
  width: 105%;
  background-color: transparent;
  display: flex;
  align-items: center;
  padding: 5px;
  box-sizing: border-box;
  margin-bottom: 5px; 
}

.header-title {
  text-align: center;
  width: 100%;
  justify-content: center;
  display: flex;
  align-items: center;
  color: #E32236;
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  text-shadow: 0 0 4px rgba(255,255,255,0.8);
}

.form-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 0 20px; 
  box-sizing: border-box;
}

.separador {
  border: none;
  height: 2px;
  background-color: #c5c5c5;
  margin: 20px;
  width: 90%; 
  align-self: center;
}

:root {
  /* Safe area inferior para iOS */
  --safe-area-bottom: env(safe-area-inset-bottom);
}

#swisscross {
  position: fixed;
  bottom: 0; /* anclado al fondo de la pestaña */
  left: 0;
  width: 100%;
  height: calc(200px + var(--safe-area-bottom));
  z-index: -1;
  pointer-events: none;
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.2);
  mask-image: linear-gradient(to top, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 60%, transparent 100%);
}

/*Responsivo a cel*/
@media (max-width: 600px) {
  body {
    flex-direction: column;
    padding: 10px;
    height: auto;
    align-items: stretch;
  }

  .contenedor {
    padding: 20px;
    border-radius: 25px;
    width: 95%;
  }

  .header-title {
    font-size: 18px;
  }

  h1 {
    font-size: 20px;
    margin: 10px 0;
  }

  form label {
    font-size: 14px;
  }

  form input, form select {
    font-size: 16px;
    padding: 10px;
  }

  form button {
    font-size: 14px;
    padding: 10px;
  }
}

.logo-generaciones {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 5px auto;
}

.opciones {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.subgrupo {
  margin-top: 20px;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grupo-glassbox {
  margin-top: 20px;
  padding: 15px 20px 20px 20px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px) saturate(160%);
  -webkit-backdrop-filter: blur(25px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.grupo-selector {
  display: flex;
  gap: 12px;
  margin-top: 1px;
  margin-bottom: 10px;
}

.grupo-tab {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

input[type="radio"]:checked + .grupo-tab {
  background: rgba(200, 30, 30, 0.8);
  color: white;
  border-color: rgba(200, 30, 30, 0.5);
  box-shadow: 0 4px 12px rgba(200, 30, 30, 0.3);
}

.grupo-input {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.grupo-input label {
  margin-top: 0;
}

.grupo-input select,
.grupo-input input {
  margin-top: 8px;
}

.grupo-input.show {
  display: block;
}

.oculto {
  display: none !important;
}

.grupo-label {
  margin-top: 15px;     
  margin-bottom: 6px;   
  font-weight: 500;
  font-size: 16px;
  display: block;
}

/* Terms and Conditions Styles */
.terms-container {
  width: 100%;
  max-width: 100%;
}

.terms-content {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px) saturate(160%);
  -webkit-backdrop-filter: blur(25px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.terms-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  text-align: justify;
  margin: 0;
  word-spacing: 0.1em;
  letter-spacing: 0.02em;
}

.terms-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Checkbox y modal del aviso de privacidad */
.terms-ack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 16px 0;
}

.terms-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
}

.terms-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.4);
  background: rgba(255,255,255,0.6);
  display: grid;
  place-content: center;
}

.terms-check input[type="checkbox"]:checked {
  background: rgba(209, 33, 33, 0.9);
  border-color: rgba(209, 33, 33, 0.9);
}

.privacy-link {
  color: #1a73e8;
  text-decoration: underline;
  font-size: 14px;
}

.modal.hidden { display: none; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  width: 90%;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.4);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  border: none;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.modal-body {
  padding: 0;
}

.modal-body iframe {
  width: 100%;
  height: 70vh;
  border: none;
  display: block;
}

.continue-btn {
  background: rgba(209, 33, 33, 0.85);
  color: white;
  border: none;
  border-radius: 18px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(180, 20, 20, 0.4);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.continue-btn:hover {
  background: rgba(220, 40, 40, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(180, 20, 20, 0.5);
}

.continue-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(180, 20, 20, 0.4);
}

/* Responsive adjustments for terms page */
@media (max-width: 600px) {
  .terms-content {
    padding: 20px;
    border-radius: 15px;
  }

  .terms-ack {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .terms-check, .privacy-link {
    font-size: 13px;
  }

  .terms-text {
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
  }

  .continue-btn {
    padding: 12px 25px;
    font-size: 15px;
    width: 100%;
    max-width: 280px;
  }

  .contenedor {
    max-width: 95%;
  }
}

@media (max-width: 480px) {
  .terms-text {
    font-size: 14px;
    line-height: 1.4;
  }

  .terms-content {
    padding: 15px;
  }

  .continue-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}
