html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100vw;
    font-family: Arial, sans-serif;
    background: #2e5237 url('fondo-selva.jpg') no-repeat center center fixed;
    background-size: cover;
}

.selva-fondo {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
}

.login-box, .formulario-selva, .resultados {
    background: rgba(255,255,255,0.98);
    border-radius: 1em;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Responsive width: cambia según la pantalla */
    width: 70vw;    /* PC por defecto */
    max-width: 700px;
    min-width: 280px;
    padding: 2.2em 2em;
    margin: 2em 0;
    font-size: 1.1em;
    z-index: 1;
}

.logo-empresa {
    display: block;
    margin: 0 auto 20px auto;
    width: 140px;
    max-width: 60vw;
    height: auto;
}

.pregunta {
    margin-bottom: 1.2em;
    width: 100%;
}

.pregunta label,
.campos-extra label {
    display: block;
    width: 100%;
    font-size: 1em;
    margin-bottom: 2px;
}

input[type="email"], input[type="text"], input[type="password"] {
    width: 100%;
    padding: 10px 8px;
    border-radius: 6px;
    border: 1px solid #c2c2c2;
    font-size: 1em;
    margin-top: 5px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

button {
    padding: 12px 28px;
    background: #36975b;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 1.12em;
    font-weight: bold;
    margin-top: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px #0002;
    transition: background 0.2s;
}

button:hover {
    background: #287c46;
}

.hojas {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    min-width: 100px;
    max-width: 100vw;
    z-index: 1;
    pointer-events: none;
}

.lluvia {
    position: absolute;
    top: 0;
    width: 2px;
    height: 18px;
    background: rgba(255,255,255,0.6);
    animation: caer 1s linear infinite;
    z-index: 10;
}

@keyframes caer {
    to { top: 100vh; opacity: 0; }
}

.animacion {
    display: block;
    margin: 0 auto 1em auto;
    width: 120px;
    max-width: 80vw;
    height: auto;
}

.error {
    color: #b00;
    margin-top: 1em;
    text-align: center;
}

.campos-extra {
    background: rgba(255,255,255,0.7);
    padding: 10px 8px;
    border-radius: 8px;
    margin-bottom: 1em;
    width: 100%;
    box-sizing: border-box;
}

.campos-extra input {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #bdbdbd;
    margin-top: 3px;
    font-size: 1em;
    box-sizing: border-box;
}

/* Responsive: en pantallas pequeñas, 80% del ancho */
@media (max-width: 900px) {
    .login-box, .formulario-selva, .resultados {
        width: 80vw;
        max-width: 98vw;
        font-size: 1.18em;
        padding: 1.2em 0.7em;
    }
    .logo-empresa {
        max-width: 80vw;
        width: 90px;
    }
}

@media (max-width: 480px) {
    .login-box, .formulario-selva, .resultados {
        width: 98vw;
        min-width: 98;
        padding: 1em 0.2em;
        font-size: 1.25em;
        border-radius: 0.7em;
    }
    .logo-empresa {
        width: 68px;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100vw; height: 100vh;
    justify-content: center;
    align-items: flex-start;   /* <-- Esto lo alinea arriba */
}
.modal-content {
    background: #fff;
    padding: 0.5em 0.5em 0 0.5em;
    border-radius: 1em;
    max-width: 95vw;
    width: 480px;
    position: relative;
    box-shadow: 0 8px 32px #0008;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Quita o comenta cualquier transform aquí */
    /* transform: translateY(-200px); */
    margin-top: 18px;   /* Opcional: separa un poco del borde superior */
}
.close {
    color: #888;
    font-size: 2.2em;
    font-weight: bold;
    position: absolute;
    top: 0.2em; right: 0.7em;
    cursor: pointer;
    z-index: 1;
}
@media (max-width: 600px) {
    .modal-content { 
        width: 98vw; 
        max-width: 98vw; 
        transform: translateY(-80px); /* Opcional: menos desplazamiento en móvil */
    }
    .close { font-size: 2.4em; right: 0.25em; }
}