@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&display=swap');

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: url("/assets/fondo.jpg") no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.form-container {
  max-width: 600px;
  margin: 50px auto;
  background: rgba(10, 10, 30, 0.8);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 0 20px #7d2cff;
  flex: 1;
}
.form-container img {
  display: block;
  margin: 0 auto 15px auto;
}

h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 20px;
  color: #ff2eff;
  text-shadow: 0 0 8px #7d2cff;
}

label {
  display: block;
  margin: 15px 0 5px;
  font-weight: bold;
  color: #cfcfff;
}

input, select, textarea {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 16px;
}

select option {
  color: black;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 8px #ff2eff;
}

::placeholder {
  color: #aaa;
}

.hidden {
  display: none;
}

.ocupacion {
  display: flex;
  gap: 15px;
}

.ocupacion div {
  flex: 1;
}

button {
  margin-top: 20px;
  width: 100%;
  padding: 15px;
  background: linear-gradient(90deg, #ff2eff, #7d2cff);
  border: none;
  border-radius: 15px;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 12px #7d2cff;
  transition: transform 0.2s ease;
}

button:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

small {
  font-size: 12px;
  color: #ff99ff;
}

/* ====== SPINNER EN BOTÓN ====== */
.btn-enviar {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
}

.btn-enviar[disabled] { 
  opacity: .7; 
  cursor: not-allowed; 
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  display: none;
  animation: spin .8s linear infinite;
}

.btn-enviar.loading .spinner { display: inline-block; }
.btn-enviar.loading .btn-text { opacity: 0.7; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status { 
  margin-top: .75rem; 
  min-height: 1.25rem; 
  font-size: .95rem; 
}
.status.ok { color: #4ade80; }
.status.err { color: #f87171; }

/* ====== FOOTER ====== */
footer {
  background: rgba(10, 10, 30, 0.9);
  text-align: center;
  padding: 10px;
  margin-top: auto;
  border-top: 2px solid #7d2cff;
  font-size: 14px;
  color: #ddd;
}

footer p {
  margin: 5px 0;
}

footer a {
  color: #ff2eff;
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 768px) {
  .form-container {
    max-width: 90%;
    padding: 20px;
  }

  h2 {
    font-size: 24px;
  }

  input, select, textarea {
    font-size: 14px;
    padding: 8px;
  }

  button {
    font-size: 16px;
    padding: 12px;
  }

  .ocupacion {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .form-container {
    margin: 20px auto;
    padding: 15px;
    border-radius: 15px;
  }

  .form-container img {
    width: 150px; /* logo más pequeño en móvil */
  }

  h2 {
    font-size: 20px;
  }

  label {
    font-size: 14px;
  }

  input, select, textarea {
    font-size: 14px;
    padding: 8px;
  }

  button {
    font-size: 14px;
    padding: 10px;
    border-radius: 10px;
  }

  footer {
    font-size: 12px;
    padding: 15px;
  }
}
