* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 0, 0.1) 0%, transparent 50%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-form {
    background: #ffffff;
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow:
        0 20px 40px rgba(255, 0, 0, 0.2),
        0 0 0 1px rgba(255, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff0000, #cc0000, #ff0000);
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-container h1 {
    color: #000000;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-container p {
    color: #666666;
    font-size: 14px;
    font-weight: 400;
}

.form {
    width: 100%;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: #333333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #333333;
}

.input-group input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}



.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #cc0000, #990000);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.form-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.link {
    color: #ff0000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.link:hover {
    color: #cc0000;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }

    .login-form {
        padding: 30px 20px;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .logo-container h1 {
        font-size: 20px;
    }

    .form-links {
        flex-direction: column;
        text-align: center;
    }
}

/* Loading Animation */
.login-btn.loading {
    position: relative;
    color: transparent;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Message styles for login */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.message.success {
    background: rgba(0, 128, 0, 0.1);
    color: #008000;
    border: 1px solid rgba(0, 128, 0, 0.3);
    display: block;
}

.message.error {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    border: 1px solid rgba(255, 0, 0, 0.3);
    display: block;
}

.message.info {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.3);
    display: block;
}

/* Estilos para el botón de mostrar/ocultar contraseña */
.password-toggle {
    position: absolute;
    right: 12px;
    top: calc(50% + 11px); /* Ajuste para centrar en el input considerando el label */
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666666;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 10;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

.password-toggle:focus {
    outline: 2px solid rgba(255, 0, 0, 0.3);
    outline-offset: 2px;
}

/* Ajustar padding del input cuando hay botón toggle */
.input-group:has(.password-toggle) input {
    padding-right: 45px;
}