
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f7;
    color: #333;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Cambiado de height a min-height */
    padding: 20px;
    position: relative;
}


/* Animación del fondo */
@keyframes moveBackground {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100px 100px;
    }
}

/* Crear líneas diagonales en el fondo */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
    background-size: 40px 40px;
    /* Tamaño del patrón */
    z-index: 0;
    animation: moveBackground 5s linear infinite;
    /* Animar el movimiento del fondo */
}


.container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    width: 100%;
    padding: 20px;
    margin: 20px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    overflow: auto;
    /* Permite el scroll si el contenido sobrepasa el tamaño */
}

.container:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.logo {
    margin-bottom: 30px;
}

.logo img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    /* Centra horizontalmente */
}

h1 {
    color: #1c1c1e;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

/* Centrar los encabezados */
.section-header {
    font-size: 16px;
    color: #1c1c1e;
    margin-bottom: 15px;
    font-weight: 600;
    width: 100%;
    text-align: center;
}

.section-header i {
    margin-right: 0px;
    margin-bottom: 7px;
    color: black;
    font-size: 1.1em;
}

.form-row .error-container {
    margin-top: 5px;
    height: 20px;
}

.error-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.error-message,
.error-container {
    color: red;
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
    /* Opcional, si deseas centrar el mensaje */
}

label {
    margin-bottom: 6px;
    color: #1c1c1e;
    font-weight: 500;
    font-size: 14px;
}

input {
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid #c7c7cc;
    font-size: 14px;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-top: 10px;
}

input:focus {
    border-color: #007aff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 122, 255, 0.5);
}

button {
    width: 100%;
    padding: 12px;
    background-color: #007aff;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

button:hover {
    background-color: #005fcc;
    transform: translateY(-1px);
}

/* Centrar la imagen de perfil */
.profile-picture-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    margin: 0 auto;
    position: relative;
    /* Cambiado para que el input se posicione dentro del contenedor */
}


.profile-picture::before {
    content: "Foto de perfil";
    font-size: 16px;
    color: #888;
    text-align: center;
    transition: opacity 0.3s ease;
}

.profile-picture.has-image::before {
    content: "";
}

.profile-picture:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.profile-picture input[type="file"] {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* Asegura que el input cubra el área circular */
    cursor: pointer;
}

.form-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Cambiado a center */
    gap: 15px;
}

.form-row {
    flex: 1 1 calc(50% - 15px);
    min-width: 200px;
    margin-bottom: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-row label {
    text-align: center;
}

.form-row input {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.input-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-container input {
    padding-right: 40px;
    /* Añadimos suficiente padding para el icono */
}

.input-container .toggle-password {
    position: absolute;
    right: 10px;
    /* Mantenemos el ícono dentro del contenedor */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    /* Alineamos verticalmente con flexbox */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}


#verificationSection {
    display: none;
    text-align: center;
}

.verification-header {
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #1c1c1e;
}

/* Estilo para campo inválido (rojo) */
input.invalid {
    border-color: red;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.error-message {
    color: red;
    font-size: 12px;
    margin-top: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    border-radius: 12px;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 12px;
    text-align: center;
    opacity: 0;
    transform: scale(0.9);
    animation: zoomIn 0.4s forwards ease-in-out;
    margin: 0;
    box-sizing: border-box;
}

.modal-content h2 {
    color: #4CAF50;
    font-size: 24px;
    margin-top: 10px;
}

.modal-content p {
    font-size: 16px;
    margin-bottom: 20px;
}

.modal-content button {
    background-color: #007aff;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.modal-content button:hover {
    background-color: #005fcc;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Animación del modal */
@keyframes zoomIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        background-color: rgba(0, 0, 0, 0);
    }

    100% {
        background-color: rgba(0, 0, 0, 0.5);
    }
}

/* Circular chart */
.circular-chart {
    display: block;
    margin: 20px auto;
    max-width: 80px;
    max-height: 80px;
}

.circle {
    stroke: #4CAF50;
    stroke-width: 4;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    animation: drawCircle 1s forwards;
}

@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}

.checkmark {
    stroke: #4CAF50;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: drawCheck 0.5s forwards 0.8s;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.encryption-message {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

@media (max-width: 768px) {
    .input-container {
        width: 100%;
        max-width: 300px;
        /* Limitar ancho en móviles para evitar desplazamientos */
    }

    .input-container input {
        padding-right: 35px;
        /* Asegura espacio suficiente para el icono */
    }

    button {
        width: 50%;
        /* Reducir el ancho del botón al 50% */
        padding: 8px;
        /* Reducir el padding para que sea más compacto */
        font-size: 15px;
        /* Reducir el tamaño del texto */
        margin: 0 auto;
        /* Centramos el botón con margen automático */
        display: block;
        /* Aseguramos que sea un bloque para que el margen auto funcione */
        border-radius: 8px;
        /* Hacemos el botón más redondeado */
    }

    .toggle-password {
        font-size: 16px;
        /* Disminuir el tamaño del icono en pantallas pequeñas */
    }

    .container {
        padding: 15px;
        margin: 15px;
    }

    .logo img {
        max-width: 150px;
    }

    .form-row {
        flex: 1 1 100%;
        max-width: 100%;
        margin-bottom: 10px;
        /* Reducir margen en pantallas menores de 768px */
    }

    input {
        padding: 8px;
        /* Reducir padding en pantallas menores de 768px */
    }

    label {
        margin-bottom: 5px;
        /* Reducir margen inferior de labels */
    }

    .encryption-message {
        font-size: 12px;
        color: #666;
        margin-top: 5px;
        text-align: center;
        max-width: 70%;
    }

}

@media (max-width: 480px) {
    .input-container {
        width: 100%;
        max-width: 300px;
        /* Limitar ancho en móviles para evitar desplazamientos */
    }

    .input-container input {
        padding-right: 35px;
        /* Asegura espacio suficiente para el icono */
    }

    button {
        width: 50%;
        /* Reducir el ancho del botón al 50% */
        padding: 8px;
        /* Reducir el padding para que sea más compacto */
        font-size: 15px;
        ;
        /* Reducir el tamaño del texto */
        margin: 0 auto;
        /* Centramos el botón con margen automático */
        display: block;
        /* Aseguramos que sea un bloque para que el margen auto funcione */
        border-radius: 8px;
        /* Hacemos el botón más redondeado */
    }

    .toggle-password {
        font-size: 16px;
        /* Disminuir el tamaño del icono en pantallas pequeñas */
    }

    .logo img {
        max-width: 120px;
    }

    h1 {
        font-size: 20px;
    }


    .container {
        margin: 10px;
        padding: 10px;
    }

    .form-row {
        margin-bottom: 5px;
        /* Reducir aún más el margen en pantallas menores de 480px */
    }

    input {
        padding: 6px;
        /* Reducir padding en pantallas muy pequeñas */
    }

    label {
        margin-bottom: 4px;
        /* Reducir margen inferior de labels */
    }
}

