* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Canvas para partículas */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Formas geométricas de fondo */
body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    z-index: 0;
}

body::before {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    top: -200px;
    right: -200px;
    animation: float 15s ease-in-out infinite;
}

body::after {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    bottom: -150px;
    left: -150px;
    animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(30px, -30px) rotate(180deg);
    }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 0 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo i {
    font-size: 42px;
    color: white;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.login-header p {
    font-size: 15px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.login-form {
    padding: 40px;
    background: white;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    color: #dc2626;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.alert-error i {
    font-size: 18px;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
}

.form-group label i {
    color: #3b82f6;
    margin-right: 8px;
    font-size: 15px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
    font-family: inherit;
}

.form-group input:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.toggle-password:hover {
    color: #3b82f6;
    background: #f1f5f9;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.login-info {
    background: #f8fafc;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.login-info p {
    font-size: 13px;
    color: #64748b;
}

.login-info strong {
    color: #1e293b;
    font-family: 'Courier New', monospace;
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }

    .login-header {
        padding: 40px 30px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .logo {
        width: 75px;
        height: 75px;
    }

    .logo i {
        font-size: 36px;
    }

    .login-form {
        padding: 30px 25px;
    }

    .login-info {
        padding: 18px 25px;
    }
}