/* Establecer una tipografía más profesional */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #4caf50, #20c997);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.login-container {
    position: relative;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    z-index: 1;
    text-align: center;
    animation: fadeIn 1s ease-out;
}

h1 {
    font-size: 1.8rem;
    color: #2e7d32;
    margin-bottom: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    text-align: left;
}

input {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f8f8f8;
    color: #333;
    font-size: 1rem;
    transition: box-shadow 0.2s ease-in-out;
}

input:focus {
    outline: none;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

button {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.1s ease;
}

button:hover {
    background-color: #388e3c;
    transform: translateY(-3px);
}

.signup-link {
    text-align: center;
    margin-top: 1rem;
}

.signup-link a {
    color: #4CAF50;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

.error-message {
    color: #f44336;
    text-align: center;
    margin-bottom: 1rem;
    display: none;
}
.password-toggle {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle input {
    margin-left: 0;
    width: 100%;
    padding-right: 40px; /* Deja espacio para el ojito */
}

p{
    color: #171515;
    font-size: 0.82rem;
}
.password-toggle .toggle-btn {
    position: absolute;
    right: 10px; /* Mantiene el ojito a la derecha del campo */
    top: 50%; /* Centra el ojito verticalmente en relación al campo de texto */
    transform: translateY(-50%);
    cursor: pointer;
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
}


@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}

/* Fondo animado */
.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.background li {
    position: absolute;
    display: block;
    list-style: none;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    animation: float 25s infinite ease-in-out;
}

.background li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-duration: 10s;
}

.background li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-duration: 12s;
    animation-delay: 2s;
}

.background li:nth-child(3) {
    left: 70%;
    width: 60px;
    height: 60px;
    animation-duration: 14s;
}

.background li:nth-child(4) {
    left: 40%;
    width: 40px;
    height: 40px;
    animation-duration: 18s;
    animation-delay: 4s;
}

.background li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-duration: 16s;
    animation-delay: 1s;
}

.background li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-duration: 19s;
}

.background li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-duration: 20s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}
