/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background: #E8F6EF;
  color: #2C3E50;
  /* IMPORTANTE: Permitir scroll siempre */
  overflow-y: auto; 
  overflow-x: hidden;
  min-height: 100vh;
}

/* Fondo decorativo */
.wave-bg {
  position: fixed; /* Fijo para que no se mueva al bajar */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* Diseño escritorio: Mancha a la izquierda/arriba */
  background: radial-gradient(circle at top left, #27AE60 10%, #1E8449 70%);
  clip-path: ellipse(80% 60% at 10% 20%);
}

/* Contenedor Principal */
.form-wrapper {
  display: flex;
  justify-content: center;
  align-items: center; /* Centrado vertical en PC */
  min-height: 100vh; 
  padding: 20px;
}

/* Caja Blanca */
.register-box {
  background: #ffffff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
  position: relative;
}

/* --- ESTILOS DEL FORMULARIO --- */
.header { text-align: center; margin-bottom: 25px; }
.header h1 { font-size: 28px; margin: 10px 0 5px; color: #27AE60; }
.header p { font-size: 14px; color: #555; }

form { display: flex; flex-direction: column; }
label { font-weight: 500; margin-bottom: 6px; font-size: 14px; }

input {
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 16px; /* 16px evita zoom automático en iPhone */
  margin-bottom: 20px;
  background-color: #fdfdfd;
}
input:focus {
  border-color: #27AE60;
  outline: none;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

button {
  background-color: #27AE60;
  color: white;
  font-size: 16px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}
button:hover { background-color: #219150; }

.footer { text-align: center; margin-top: 20px; font-size: 14px; }
.footer a { text-decoration: none; color: #F39C12; }

/* =========================================
   MÓVIL (SOLUCIÓN DEFINITIVA)
   ========================================= */
@media (max-width: 768px) {
  
  /* 1. Cambiamos el fondo para que sea un "techo" verde */
  .wave-bg {
    height: 40vh; 
    clip-path: ellipse(150% 100% at 50% 0%); /* Curva arriba */
    background: linear-gradient(180deg, #27AE60 0%, #1E8449 100%);
  }

  /* 2. DESACTIVAMOS FLEXBOX VERTICAL: 
     Esto evita que el formulario se corte arriba/abajo */
  .form-wrapper {
    display: block; /* Ya no es flex, es bloque normal */
    padding-top: 80px; /* Empujamos hacia abajo para no tapar con el techo verde */
    padding-bottom: 40px; /* Espacio abajo para el scroll */
    height: auto;
    min-height: auto;
  }

  /* 3. Ajustes de la caja */
  .register-box {
    margin: 0 auto; /* Centrado horizontal */
    padding: 30px 20px;
  }
}