* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #1f80ff 0%, #112a6d 100%);
    position: relative;
}

/* Fondo animado */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url('https://images.unsplash.com/photo-1667876941443-f359eb8eae54?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: -1;
}

/* Partículas flotantes */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

.particle:nth-child(1) { width: 8px; height: 8px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 12px; height: 12px; left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { width: 6px; height: 6px; left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { width: 10px; height: 10px; left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { width: 8px; height: 8px; left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { width: 14px; height: 14px; left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { width: 6px; height: 6px; left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { width: 10px; height: 10px; left: 80%; animation-delay: 14s; }

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    z-index: 1;
    position: relative;
}

.login-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: slideIn 0.8s ease-out;
}

.login-form:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.login-title {
    text-align: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    padding-left: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    outline: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    z-index: 2;
}

.checkbox-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox input {
    opacity: 0;
    position: absolute;
}

.custom-checkbox input:checked + .checkmark {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

.custom-checkbox input:checked + .checkmark::after {
    opacity: 1;
}

.checkmark {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: white;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-top: 10px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.submit-btn:active {
    transform: translateY(0);
}

.register-link {
    text-align: center;
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.register-link a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.register-link a:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.error-message {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    color: #ffb3b3;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 480px) {
    .login-form {
        width: 90%;
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.back-btn i {
    font-size: 24px;
    line-height: 1;
}

.text-center {
    text-align: center !important;
}

.mt-3 {
    margin-top: 1rem !important;
}